ripter / jquery.rating Goto Github PK
View Code? Open in Web Editor NEWStar Rating Plugin
Home Page: http://zensoftware.org/archives/483
License: MIT License
Star Rating Plugin
Home Page: http://zensoftware.org/archives/483
License: MIT License
The first star is selected even when there is no rating yet.
This is due to the fact that the first <option>
of my <select>
element is set as selected when no one else is.
Even if there is no selected="selected"
parameter in the element, I can see that with the inspector (firebug). So does jQuery see this element as selected.
I don't know why you don't have the problem and how to avoid it... Thanks!
Can you explicitly mention a license please (MIT would be a good option).
Using jQuery 1.7, isDirty is not found when hitting the change function.
104 if (isDirty)
105 isDirty = true;
I know it sounds like this is probably a feature and not a bug, but i have a heavily-ajaxy form that shows and hides panels and needs to call .rating() each time. when it does that, you end up with several rating controls for 1 select box. I edited the source in my app to add one line to remove it, but i'm not 100% sure this is foolproof, so i thought I'd let you know and you could see if it was worth adding in a future version.
in the section at the bottom where you "process the matched elements," i made the following edit:
//We only do select types
if ($(this).attr("type") !== "select-one") { return; }
//Save 'this' for ease of development
var selectBox = this;
// custom code to stop duplicate creation
if ($(selectBox).siblings("div").length > 0) return false;
// end custom code
//Hide the selectBox
$(selectBox).css("display", "none");
...
Clicking on stars doesnt fire onchange event that is bound to the select box.
Tried the included default.html ("Bind $.serialize() On Change") example on all Chrome, FF and IE and it doesn't work.
Uncaught ReferenceError: isDirty is not defined
Line 104
jquery 1.6.1
If the option value and text are different then preserving the selected value will not work correctly.
With jquery 1.5, cancel link doesnt clear the first value in the rating
Hi,
I think that it is important to have a property such as cancelTitle in-which the English word Cancel may be replaced by any other word such as Quit, Annuleren, Annulla, Annuler, Abbrechen, إلغاء, etc
So we can do:
$(".rating").rating({showCancel: true, cancelValue: null, cancelTitle: 'Annuler'})
Hello there.
I am using this cool plugin in a Rails application and it's giving me an error when I click on a star, the error is
Uncaught ReferenceError: isDirty is not defined
Plus I had to change some line of code to make it work with Rails select helper generated code. I don't know if I am missing something or if my mod is really useful. I'd like to discuss it with you, but because you haven't provided an email I write you here :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.