Restructured if/else's for better readability

(cherry picked from commit 3ce8429f4f)
This commit is contained in:
Giovanni Giacobbi 2011-03-20 03:19:36 +01:00 committed by Scott González
parent c9341a3619
commit eb3d955438

View File

@ -185,17 +185,13 @@ $.widget( "ui.button", {
if ( this.element.is(":checkbox") ) {
this.type = "checkbox";
} else {
if ( this.element.is(":radio") ) {
} else if ( this.element.is(":radio") ) {
this.type = "radio";
} else {
if ( this.element.is("input") ) {
} else if ( this.element.is("input") ) {
this.type = "input";
} else {
this.type = "button";
}
}
}
if ( this.type === "checkbox" || this.type === "radio" ) {
// we don't search against the document in case the element