I’m using this java script library to show ratings http://www.fyneworks.com/jquery/star-rating/#tab-Overview. I’m using below method to set the ranks When page loads.
<input name='star_1' type='radio' value='1' class='star'/>
<input name='star_1' type='radio' value='2' class='star'/>
<input name='star_1' type='radio' value='3' class='star'/>
<input name='star_1' type='radio' value='4' class='star'/>
<input name='star_1' type='radio' value='5' class='star'/>
$('.levelBucket li .star').rating({
required: true,
callback: function (value, link) { }
});
This works fine when user clicks on stars but i want to set rating with out user click. There is a separate event and at the end of that event i want to change rating by Java script. How can i do that ?
Also see the API.
=== UPDATE ===
add to the html:
add to the javascript:
Also see this example.