From ad746da49d3ff0ff2f0c9fb919f6bd9bc956a8ac Mon Sep 17 00:00:00 2001 From: dmitrybitman Date: Thu, 28 Jan 2016 19:42:15 +0300 Subject: [PATCH] Update bootstrap-rating-input.js Read initial value from input --- src/bootstrap-rating-input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap-rating-input.js b/src/bootstrap-rating-input.js index 9cd6e54..289fb7f 100644 --- a/src/bootstrap-rating-input.js +++ b/src/bootstrap-rating-input.js @@ -56,7 +56,7 @@ var ratingOptions = this.options = $.extend({}, DEFAULTS, inputOptions($input), options); var $ratingEl = this.$el = createRatingEl($input, ratingOptions); $input.addClass(hiddenClass).before($ratingEl); - this.highlight(ratingOptions.value); + this.highlight($input.val()); }; Rating.VERSION = '0.3.0'; @@ -141,4 +141,4 @@ }); }); -}(jQuery)); \ No newline at end of file +}(jQuery));