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
This commit is contained in:
parent
6d01645716
commit
3ce8429f4f
8
ui/jquery.ui.button.js
vendored
8
ui/jquery.ui.button.js
vendored
@ -186,17 +186,13 @@ $.widget( "ui.button", {
|
|||||||
|
|
||||||
if ( this.element.is(":checkbox") ) {
|
if ( this.element.is(":checkbox") ) {
|
||||||
this.type = "checkbox";
|
this.type = "checkbox";
|
||||||
} else {
|
} else if ( this.element.is(":radio") ) {
|
||||||
if ( this.element.is(":radio") ) {
|
|
||||||
this.type = "radio";
|
this.type = "radio";
|
||||||
} else {
|
} else if ( this.element.is("input") ) {
|
||||||
if ( this.element.is("input") ) {
|
|
||||||
this.type = "input";
|
this.type = "input";
|
||||||
} else {
|
} else {
|
||||||
this.type = "button";
|
this.type = "button";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( this.type === "checkbox" || this.type === "radio" ) {
|
if ( this.type === "checkbox" || this.type === "radio" ) {
|
||||||
// we don't search against the document in case the element
|
// we don't search against the document in case the element
|
||||||
|
Loading…
Reference in New Issue
Block a user