on click
February 20, 2008 - 9:16pm — mg
| Project: | Star Rating Plugin |
| Version: | 1.0.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
settings = jQuery.extend({
cancel:'Cancel Rating',
click:function(){jQuery(this).parent().submit()}
}, settings);
when clicking, the default should be submitting the form imo
if not, then something like onclick: 'nothing'(default) <-> 'submit' <-> 'ajaxSubmit' would be helpful

Comments
#1
I completely disagree with submitting the form automatically when a star is clicked. This would cause more problem than it would solve and it would make it difficult to integrate the plugin with form that require other information.
But, I've added a callback function that let's you handle the form submission, like this:
$('.auto-submit-star').rating({ callback: function(value, link){ this.form.submit(); } });
Or like this for ajax submission:
$('.auto-submit-star').rating({ callback: function(value, link){ $(this.form).ajaxSubmit(); } });
Please get the latest version from:
http://www.fyneworks.com/jquery/star-rating/
#2