javiertoledo / bootstrap-rating-input

Another plugin that eases the generation of rating stars for jQuery and Bootstrap
MIT License
319 stars 155 forks source link

Maybe add an explanation of default value to the docs #26

Closed johncadigan closed 8 years ago

johncadigan commented 10 years ago

Hello Javier!

Since I recently recieved and e-mail about setting default display values, it might be worth adding an explanation of how you can set default value when it is to be voted upon by seting a value for the input:

I hope you are well,

-John

javiertoledo commented 10 years ago

Yes, that would be useful, I'll add it if I find some time, PRs are welcome :-)

vgoklani commented 9 years ago

Hi - How do I set the default display values?

Thanks!

Ahtenus commented 9 years ago

Hi, just for others reference this is how i managed to set default values:

<input type="number" name="rating" class="rating" value="3" />

But for some reason it didn't render the stars until one of the stars was hovered, so I added the following line to on DOM ready:

$(".rating-input i:first-child").trigger('mouseleave');

Cheers, Viktor

tarekadam commented 8 years ago

Thanks Viktor. That fixed it.

javiertoledo commented 8 years ago

I have added a section to the readme explaining how to set a defailt value https://github.com/javiertoledo/bootstrap-rating-input#can-i-set-a-default-value

@Ahtenus the bug you're describing here is fixed on version 0.3.1, thanks for reporting it ;-)