-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting value does not display correct rating (i.e. number of stars) #16
Comments
The plugin was not designed to act via JS as a conventional input, but it would definitively be a very nice addition! I'll address this on some near future as soon as I find some spare time, thanks for your feedback! Meanwhile you should be able to activate the stars and assign the value with a function similar to this one (I haven't tested it):
|
Works like a charm...cheers! |
I spoke slightly too soon...I needed to edit just the first line of the function to go up to parent (div.rating-input) of my ratingInputSelector to get it to work correctly. |
Thank you both. This worked just as I wanted it to, allowing the same input to be used for both new and existing records. |
I'm using your fine little piece of code in a Bootstrap 3 modal pop up. I'm setting the value of the control, and it appears to get set correctly.
$("#rating").val(3);
alert($("#rating").val()); // 3
However, no stars are selected when the controls is rendered.
Tested in Chrome, FF, and IE.
The text was updated successfully, but these errors were encountered: