test("label, default", function() {
$("#button").button();
deepEqual( $("#button").text(), "Label" );
+ deepEqual( $( "#button").button( "option", "label" ), "Label" );
$("#button").button("destroy");
});
label: "xxx"
});
deepEqual( $("#button").text(), "xxx" );
+ deepEqual( $("#button").button( "option", "label" ), "xxx" );
$("#button").button("destroy");
});
test("label default with input type submit", function() {
deepEqual( $("#submit").button().val(), "Label" );
+ deepEqual( $("#submit").button( "option", "label" ), "Label" );
});
test("label with input type submit", function() {
label: "xxx"
}).val();
deepEqual( label, "xxx" );
+ deepEqual( $("#submit").button( "option", "label" ), "xxx" );
});
test("icons", function() {
focusClass = "ui-state-focus";
if ( options.label === null ) {
- options.label = this.buttonElement.html();
+ options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
}
this.buttonElement