Open smohadjer opened 9 years ago
I initialize the plugin within the plugin itself so the most novice of users don't have to do anything.
But what's the best practice here? Some of this code dates back 8 years. Happy to change if its better for the community.
Why are you initializing plugin from inside the plugin? I'm referring to this line: https://github.com/fyneworks/star-rating/blob/master/jquery.rating.js#L404
This means users shouldn't use class="star" on input elements if they want to initialize plugin themselves otherwsie plugin will initialize twice and cause various bugs such as callback not executing anymore, etc.