Comments (2)
Nevermind, added a class 'review-set' to the ones I did not want the user to be able to modify and did this:
if(!this.$el.hasClass('review-set')){
this.$el.on('mouseover.starrr', 'span', function(e) {
return _this.syncRating(_this.$el.find('span').index(e.currentTarget) + 1);
});
this.$el.on('mouseout.starrr', function() {
return _this.syncRating();
});
this.$el.on('click.starrr', 'span', function(e) {
return _this.setRating(_this.$el.find('span').index(e.currentTarget) + 1);
});
this.$el.on('starrr:change', this.options.change);
}
Don't know if it is the best solution but it seems to work for me.
from starrr.
Added the readOnly
option in 1.0.0: #14
from starrr.
Related Issues (20)
- Version Number HOT 1
- [Question] - How to manually set the rating?
- clicking twice at the same star = undefined HOT 5
- Can we replace star images? HOT 3
- Keyboard support and half star rating HOT 3
- Click on a link scroll the page on the top of screen HOT 3
- How to initialize multiple star ratings HOT 3
- readOnly not working HOT 1
- Set Rating dynamically HOT 4
- Support for half stars HOT 4
- iPad trouble on click
- How can I get value from Starr which is by default. ? set through 'rating' Option HOT 2
- How to get starrr rating in JQuery? HOT 2
- How do i get the value of current rating?
- How can I replace Glyphicons with Fontawesome, as Bootstrap 4.1 > versions is deprecated using Glyphicons?
- Making input required HOT 1
- Add gradient to stars
- Please upload to cdn
- Default font-awesome classes should be updated
- Does it supports decimals values? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starrr.