doej doej - 4 months ago 17
jQuery Question

how to retrieve the value of the star clicked in a jquery star rating

I am using a jquery star rating plugin.the link is [here] (http://irfandurmus.com/projects/jquery-star-rating-plugin/).
here's the image

I have a table in which one column have a star rating to rate an item. I am looping the star rating to rate the item present in all rows.I need to get the value of star clicked in each row . However i couldn,t get the value of star clicked in each row. please help me with this.

Answer

You can do it with Javascript:

jQuery('.star').on("click", function(){
  var rating = jQuery(this).attr('title');
});
Comments