簡単な質問です。jqueryモバイルボタンがどの状態にあるかを知るにはどうすればよいですか? ドキュメントにはそのための方法がありません。
http://jquerymobile.com/test/docs/buttons/buttons-methods.html
簡単な質問です。jqueryモバイルボタンがどの状態にあるかを知るにはどうすればよいですか? ドキュメントにはそのための方法がありません。
http://jquerymobile.com/test/docs/buttons/buttons-methods.html
ボタンウィジェットが無効になっている場合、そのdisabledオプションはに設定されるためtrue、次のように記述できます。
var isButtonDisabled = $("#yourButton").button("option", "disabled");
    アクティブ/非アクティブ:
if($('#button-test').hasClass('ui-btn-active')) {
    alert('Active');    
} else {
    alert('Not active');
}
有効/無効
if($('#button-test').hasClass('ui-state-disabled')) {
    alert('Disabled');    
} else {
    alert('Enabled');
}