Skip to content

Commit

Permalink
Prevent rating init if element is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed May 8, 2014
1 parent 8bd2c60 commit 779778c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/star-rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
*/
init: function (options) {
this.options = options;
if (!this.$elementOrig.is(":visible")) {
return;
}
if (typeof this.$element == 'undefined') {
this.initSlider(options);
}
Expand Down
2 changes: 1 addition & 1 deletion js/star-rating.min.js

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

0 comments on commit 779778c

Please sign in to comment.