Alter rating plugin to submit on click

Alter rating plugin to submit on click

Hello,

I'm using this script for rating:

http://www.fyneworks.com/jquery/star-rating/

Currently, the script includes a submit button that allows the user to submit their chosen rating.

I'd like to alter the code to submit the rating when the user clicks on a star, as opposed to when they click submit.

Given the nature of this script (the form has an onsubmit event handler which does the heavy lifting) it should be easy to convert it to perform the onsubmit on a radio button click.

If you can help me it'd be most appreciated.

Here is the code sample:


<form onsubmit='
                                 $(this).after($(this).serialize()+"<br/>");
                                 return false;
                                 $("input",this).rating("readOnly",true);
                                 return false;
                                '>
                                 <input type="radio" value="1" name="rating" class="star {callback:function(){ this.form.submit() }}"/>
                                 <input type="radio" value="2" name="rating" class="star"/>
                                 <input type="radio" value="3" name="rating" class="star" checked="checked"/>
                                 <input type="radio" value="4" name="rating" class="star"/>
                                 <input type="radio" value="5" name="rating" class="star" id="tester"/>
                                 
                                 <input type="submit" value="Submit" />
                                </form>


Thank you!