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

Does it supports decimals values? #40

Open
qzi35 opened this issue Aug 22, 2019 · 2 comments
Open

Does it supports decimals values? #40

qzi35 opened this issue Aug 22, 2019 · 2 comments

Comments

@qzi35
Copy link

qzi35 commented Aug 22, 2019

Hello, does the plugin supports decimals values, for example to set de star at middle?

@laminko
Copy link

laminko commented Sep 30, 2019

yeah, please support decimals, too.

@devnox
Copy link

devnox commented Jan 22, 2020

results.push($stars.eq(i - 1).removeClass(rating >= i ? this.options.emptyClass : this.options.fullClass).addClass(rating >= i ? this.options.fullClass : this.options.emptyClass));

change to

results.push($stars.eq(i - 1).removeClass(Math.round(rating) >= i ? this.options.emptyClass : this.options.fullClass).addClass(Math.round(rating) >= i ? this.options.fullClass : this.options.emptyClass));

Math.round() does the job! :)

Cheers!

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

3 participants