I will disable this button on my jQuery Mobile webpage:
$(document).ready(function() { $("#deliveryNext").button(); $("#deliveryNext").button('disable'); });
and I can turn it on with
$("#deliveryNext").button('enable');
But how can I check if a button is disabled or enabled?
This command gives "undefined":
$("#deliveryNext").attr('disabled')
Some ideas?
Edit: I found out that $ ("# deliveryNext"). button ('disable') only seams to change the style of the button, the click works fine after I need to disable the button, how to do it. I tried .attr ('disabled', 'disabled'), but when I then test .attr ('disabled'), I get undefined ...
Edit2: more about my "real" problem in How to disable a link in jQuery Mobile?
javascript jquery jquery-ui jquery-mobile
RickardP Jun 22 '11 at 8:45 2011-06-22 08:45
source share