senthilporunan / jRate

Generate SVG based Rating with various customized fancy features. More information @ www.toolitup.com
http://www.toolitup.com/jRate.html
MIT License
66 stars 45 forks source link

How to reset JRate Star to zero manually #15

Closed usamamashkoor closed 9 years ago

usamamashkoor commented 9 years ago

when i click on 3rd star the 3rd star is highligted then.but when i click on reset button to reset star to zero value mean no star is selected i have tried to do this but it creats a new 5 five next to previous 5 stars.. Here is my code $(".jRate").jRate({
onSet: function(rating) {
alert(rating); } }); On reset button $('.reset').on('click',function(){ $(".jRate").jRate({ rating: 0,
}); });

senthilporunan commented 9 years ago

Hi,

We fixed this bug. You can use the latest code i have checked in the demo code for your above mentioned scenario.

For Eg:

        var toolitup = $("#jRate").jRate({
            rating: 1,
            strokeColor: 'black',
            width: 80,
            height: 80,
            precision: 0.1,
            minSelected: 1
        });

        $('#btn-click').on('click', function() {
            toolitup.setRating(0);              
        });

Thanks, Senthil.

usamamashkoor commented 9 years ago

Thnx Bro