diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-04-02 19:12:21 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-04-02 19:12:21 -0400 |
commit | 639afa595465f6a1f61e080f2b671af4aac69b4a (patch) | |
tree | cab8f18e790d7646677ca0207d21025c9c708428 /ui/jquery.ui.button.js | |
parent | 3e6877a892b8fb70f1130f639dfde09ce5af6236 (diff) | |
download | jquery-ui-639afa595465f6a1f61e080f2b671af4aac69b4a.tar.gz jquery-ui-639afa595465f6a1f61e080f2b671af4aac69b4a.zip |
Lint fixes.
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 701cb44d8..f84d748cf 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -186,7 +186,7 @@ $.widget( "ui.button", { if ( options.disabled ) { return false; } - if ( event.keyCode == $.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) { + if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { $( this ).addClass( "ui-state-active" ); } }) @@ -212,6 +212,7 @@ $.widget( "ui.button", { }, _determineButtonType: function() { + var ancestor, labelSelector, checked; if ( this.element.is(":checkbox") ) { this.type = "checkbox"; @@ -226,8 +227,8 @@ $.widget( "ui.button", { if ( this.type === "checkbox" || this.type === "radio" ) { // we don't search against the document in case the element // is disconnected from the DOM - var ancestor = this.element.parents().last(), - labelSelector = "label[for='" + this.element.attr("id") + "']"; + ancestor = this.element.parents().last(); + labelSelector = "label[for='" + this.element.attr("id") + "']"; this.buttonElement = ancestor.find( labelSelector ); if ( !this.buttonElement.length ) { ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); @@ -238,7 +239,7 @@ $.widget( "ui.button", { } this.element.addClass( "ui-helper-hidden-accessible" ); - var checked = this.element.is( ":checked" ); + checked = this.element.is( ":checked" ); if ( checked ) { this.buttonElement.addClass( "ui-state-active" ); } |