title: How to update raty value
body: <p>I am using <a href="http://wbotelhos.com/raty/" rel="nofollow">jquery raty plugin</a>, there is a <a href="http://wbotelhos.com/raty/#click" rel="nofollow">click event</a> 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:</p>
  
  <pre><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></pre>
  
  <p>I tried with below but no success;</p>
  
  <pre><code>$(this).data('rating',2);
  </code></pre>
  
  <p>Thanks for any help.</p>