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

Store reference to rating object #62

Closed jkrehm closed 6 years ago

jkrehm commented 7 years ago

Store reference to rating object in input so the rating's internal functions are exposed, e.g. $('input').data('rating').setValue(4). The API could potentially be refactored to be something like $('input').rating('setValue', 4) but this much easier to implement.

If there's a way to access the internal API (especially setValue) and I'm just overlooking it, please let me know.

javiertoledo commented 6 years ago

This definitely works, but the approach is a bit hack-ish for my taste, thanks anyway for the PR!