Skip to content

Commit 52fd686

Browse files
committed
Merge branch 'master' of https://github.com/thg2k/jquery-ui
2 parents bc08ffa + 3ce8429 commit 52fd686

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

ui/jquery.ui.button.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,21 +183,17 @@ $.widget( "ui.button", {
183183
},
184184

185185
_determineButtonType: function() {
186-
186+
187187
if ( this.element.is(":checkbox") ) {
188188
this.type = "checkbox";
189+
} else if ( this.element.is(":radio") ) {
190+
this.type = "radio";
191+
} else if ( this.element.is("input") ) {
192+
this.type = "input";
189193
} else {
190-
if ( this.element.is(":radio") ) {
191-
this.type = "radio";
192-
} else {
193-
if ( this.element.is("input") ) {
194-
this.type = "input";
195-
} else {
196-
this.type = "button";
197-
}
198-
}
194+
this.type = "button";
199195
}
200-
196+
201197
if ( this.type === "checkbox" || this.type === "radio" ) {
202198
// we don't search against the document in case the element
203199
// is disconnected from the DOM

0 commit comments

Comments
 (0)