diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-03-21 09:47:29 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-03-21 09:47:29 -0400 |
commit | 52fd686f08d9ff1fab8b7fd92384e33bc26465da (patch) | |
tree | 7808f3f9ff21fbb499c8467d5b8fd7f3db4b7e26 /ui | |
parent | bc08ffa74a1a244277eecd1ba2c5df95300bf376 (diff) | |
parent | 3ce8429f4fce08176c8bc06d4ff4bf8830f8c916 (diff) | |
download | jquery-ui-52fd686f08d9ff1fab8b7fd92384e33bc26465da.tar.gz jquery-ui-52fd686f08d9ff1fab8b7fd92384e33bc26465da.zip |
Merge branch 'master' of https://github.com/thg2k/jquery-ui
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.button.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 9cf8974b2..5777d4753 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -183,21 +183,17 @@ $.widget( "ui.button", { }, _determineButtonType: function() { - + if ( this.element.is(":checkbox") ) { this.type = "checkbox"; + } else if ( this.element.is(":radio") ) { + this.type = "radio"; + } else if ( this.element.is("input") ) { + this.type = "input"; } else { - if ( this.element.is(":radio") ) { - this.type = "radio"; - } else { - if ( this.element.is("input") ) { - this.type = "input"; - } else { - this.type = "button"; - } - } + this.type = "button"; } - + if ( this.type === "checkbox" || this.type === "radio" ) { // we don't search against the document in case the element // is disconnected from the DOM |