},
_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