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.
<input type='button'>
or<button>...</button>
– Dutchie432<div id="DT1S"> <input type="button" name="DT1S" value="Start Job" /> </div> <div id="STS"> <input type="button" name="STS" value="Start Surveillance" /> </div> <div id="STE"> <input type="button" name="STE" value="End Surveillance" /> </div> <div id="DT2E"> <input type="button" name="DT2E" value="End Job" /> </div>
– swg1cor14