Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't initialize properly if inputs have class="star" #12

Open
smohadjer opened this issue Jan 24, 2015 · 1 comment
Open

Plugin doesn't initialize properly if inputs have class="star" #12

smohadjer opened this issue Jan 24, 2015 · 1 comment

Comments

@smohadjer
Copy link

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.

@fyneworks
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants