eddysilvamendes / jquery-star-rating-plugin

Automatically exported from code.google.com/p/jquery-star-rating-plugin
0 stars 0 forks source link

Display multiply ratings status #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, i'm having a problem in rails app. In cycle i'm making criterions, each 
have a star-rating, i need to display number of rating near each line of stars, 
walking through demos i figured out this: 

callback: function(value, link){
        var tip = $('.rate-amount');
          tip[0].data = tip[0].data || tip.html();
          tip.html(link.title || 'value: '+value);
        }  // executed when a star is clicked

but this makes the same status for each line, the question is how to make 
displaying by id..clicking star on one line will display status of this 
line..other line-its status near.

PLUGIN VERSION: v3.13
JQUERY VERSION: v1.5.1

BROWSER(S): mozilla

Additional info: maybe possible to connect by input name, cause it's forming 
like this :name => "ratings[#{criterion.id}]

Original issue reported on code.google.com by consciou...@gmail.com on 14 Mar 2011 at 1:18

GoogleCodeExporter commented 8 years ago
callback: function(value, link) {
          var jLine = $(link).closest('.rating-container'),
          jTip = jLine.find('.rate-amount');
          jTip.html(link.title);
}
this works
oops sorry)))

Original comment by consciou...@gmail.com on 14 Mar 2011 at 8:35

GoogleCodeExporter commented 8 years ago

Original comment by diego.a...@gmail.com on 23 Feb 2013 at 5:12