问题
I'm using jQuery 1.6, and jQuery Mobile Beta 1. I have a jQuery Mobile themed button which I initialize as disabled. During a certain event, I'd like to enable the button. The following code is what I'd expect to work:
$("#id").prop("disabled", false);
But it seems like this doesn't propagate up to the jQuery Mobile wrapping DOM elements.
回答1:
The solution, per the jQuery Mobile docs page Form Plugins Method is as follows:
$('#id').button('enable');
来源:https://stackoverflow.com/questions/6497131/how-to-enable-a-jquery-mobile-button