This is for jQuery Mobile. Not all regular jQuery answers will work.
I can't get my buttons to disable in jQuery Mobile.
jQuery Mobile says to use
$('input').button('disable');
But I get an error message in Firebug:
uncaught exception: cannot call methods on button prior to initialization; attempted to call method 'disable'.
It's in the document ready section of my page so I dont know how it's not initialized yet.
I've tried calling the button directly by its id but that doesn't work.
I've tried:
$('button').attr("disabled", "disabled");
Doesn't work.
I also have a switch command that will enable one button based on what the value is. I've got that part to where its routing to right "case" statements, but the enable/disable buttons thing in jQuery mobile is not working.
code: http://pastebin.com/HGSbpAHQ
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…