eLRovaMujxgvhid
New Member
I am using jquery raty plugin, there is a click event which I am using to send rating data and then return new rating from database, but I cant figure out how to update returned rating, my code:\[code\] $('.starrating').raty({ number:10, score: function() { return $(this).attr('data-rating'); }, click: function(score, evt) { var contentid = $(this).attr('id'); $.post('/main/rating.php',{score:score, contentid:contentid }, function(data){ //alert(data+' Score = '+score); $(this).data('rating',2); }); } });\[/code\]I tried with below but no success;\[code\]$(this).data('rating',2);\[/code\]Thanks for any help.