I am trying to disable the button I tap on and enable the rest. Here is an example
<div class="container">
<input type="button" class="status" value="Input1">
<input type="button" class="status" value="Input2" disabled="">
<input type="button" class="status" value="Input3" disabled="">
</div>
var container = $('.container');
container.on("click", '.status', function () {
$('.status').prop('disabled', false).button(); // set all buttons to enabled
$(this).prop('disabled', true).button(); // set the one I clicked to disabled
});
But it's not working, How can I accomplish enable\disable with jQuery-mobile?
This is the right way to disable after initialization:
Always check the API site
LIVE DEMO