-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
Allow score to be set back to 0 #44
Comments
Hi dannyroa, Semantically there is no way to vote as zero. But if you want set zero, change the lines: But remember, you cant click on star number zero and the cancel button take off the value. |
My rating selector is in a form. When I reset the form, it should reset the rating too. What is the best way to do this? Thanks. |
You can manually clear the $('.rating input').removeAttr('value'); Or call the $('.rating').raty('cancel'); |
I was trying to do 'cancel' earlier but it wasn't working. Turned out I had an old version of the plugin. Sorry about that. Thanks for the help! |
After I initialized it the element with raty, I should be able to reset the value to 0.
I tried:
$("#rating_selector").raty('set', {'score' : 0});
$("#rating_selector").raty('score', 0);
Both creates new rating.
The text was updated successfully, but these errors were encountered: