senthilporunan / jRate

Generate SVG based Rating with various customized fancy features. More information @ www.toolitup.com
http://www.toolitup.com/jRate.html
MIT License
66 stars 45 forks source link

Multiple instances with predefined rating #31

Open ilikourou opened 7 years ago

ilikourou commented 7 years ago

Hello there.

Is there any way to have multiple jRate instances within a page, but only call $("#jRate").jRate(); once?

Let's say I would like to have 5 jRate instances and each one of them has a predefined rating (obtained through a database). Does this mean I have to call $("#jRate").jRate(); 5 times, in order to obtain each rating, or can I use the #id (<div class="jRate" id="somethingUnique"></div>) inside the js code?

Thank you, Ilias

danman1234 commented 7 years ago

I have the same problem, it doesn't work with a class, using it for multiple instances thast way as described in de documentation. it will colour all instances. you can only use multiple id's then it works, but its a hassle