Skip to content

Instantly share code, notes, and snippets.

@edwinwebb
Created November 6, 2012 12:15
Show Gist options
  • Save edwinwebb/4024311 to your computer and use it in GitHub Desktop.
Save edwinwebb/4024311 to your computer and use it in GitHub Desktop.
raty loop
$.fn.raty.defaults.click = function(s,e) {
$(this).siblings(".text").text(s);
};
<div class="star"></div><p class="text"></p>
$(".star").each(function(i) {
var target = $(this);
target.raty({scoreName: "score" + i})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment