mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Restructured if/else's for better readability
(cherry picked from commit 3ce8429f4f
)
This commit is contained in:
parent
c9341a3619
commit
eb3d955438
14
ui/jquery.ui.button.js
vendored
14
ui/jquery.ui.button.js
vendored
@ -185,16 +185,12 @@ $.widget( "ui.button", {
|
||||
|
||||
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" ) {
|
||||
|
Loading…
Reference in New Issue
Block a user