raty icon indicating copy to clipboard operation
raty copied to clipboard

$('selector').raty('score') doesn't work

Open slonofanya opened this issue 10 years ago • 3 comments

I choose one and a half stars, but the method returns a value of "4.551389058430989".

slonofanya avatar Sep 11 '14 06:09 slonofanya

... click: function(){ setTimeout(function(){ console.log($('selector').raty('score')); }, 200); }

This crutch solves the problem. But option "click" has to be fixed.

slonofanya avatar Sep 11 '14 06:09 slonofanya

Use the code from master.

wbotelhos avatar Sep 13 '14 06:09 wbotelhos

I am using the latest code from master and it doesn't fix this issue.

$('.raty').raty({
            starType: 'i' ,
            path: '/web/library/raty/images/',
            half: true,
            click: function(event) {
                var rate = $('.raty').raty('score');
                $.ajax({
                    async: false,
                    type: 'post',
                    dataType: 'json',
                    data: {rate: rate},
                    url: xhrSubmitRating,
                    success: function(data){

                    }
                });
            }
        });

ouhman avatar Jul 22 '15 09:07 ouhman