Skip to content

Commit

Permalink
Fix for #24 (Suggested by @swfideas)
Browse files Browse the repository at this point in the history
  • Loading branch information
javiertoledo committed Aug 23, 2014
1 parent 856a179 commit 7ad74b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/bootstrap-rating-input.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/bootstrap-rating-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// A private function to highlight a star corresponding to a given value
function _paintValue(ratingInput, value, active_icon, inactive_icon) {
var selectedStar = $(ratingInput).find('[data-value=' + value + ']');
var selectedStar = $(ratingInput).find('[data-value="' + value + '"]');
selectedStar.removeClass(inactive_icon).addClass(active_icon);
selectedStar.prevAll('[data-value]').removeClass(inactive_icon).addClass(active_icon);
selectedStar.nextAll('[data-value]').removeClass(active_icon).addClass(inactive_icon);
Expand Down Expand Up @@ -43,7 +43,7 @@
clearable = originalInput.data('clearable') || null,
clearable_i = originalInput.data('clearable-icon') || 'glyphicon-remove',
stars = '';

// HTML element construction
for (i = min; i <= max; i++) {
// Create <max> empty stars
Expand Down Expand Up @@ -71,7 +71,7 @@
.data('icon-lib', lib)
.data('active-icon', active)
.data('inactive-icon', inactive);

// Rating widget is wrapped inside a div
el = [
'<div class="rating-input">',
Expand Down

0 comments on commit 7ad74b4

Please sign in to comment.