title: Disable Buttons in jQuery Mobile
body: <p><strong>This is for jQuery Mobile. Not all regular jQuery answers will work.</strong></p>
  
  <p>I can't get my buttons to disable in jQuery Mobile.</p>
  
  <p>jQuery Mobile says to use</p>
  
  <pre><code>$('input').button('disable');   
  </code></pre>
  
  <p>But I get an error message in Firebug:</p>
  
  <blockquote>
    <p>uncaught exception: cannot call methods on button prior to initialization; attempted to call method 'disable'.</p>
  </blockquote>
  
  <p>It's in the document ready section of my page so I dont know how it's not initialized yet.</p>
  
  <p>I've tried calling the button directly by its id but that doesn't work.</p>
  
  <p>I've tried:</p>
  
  <pre><code>$('button').attr("disabled", "disabled");
  </code></pre>
  
  <p>Doesn't work.</p>
  
  <p>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.</p>
  
  <p>code: <a href="http://pastebin.com/HGSbpAHQ">http://pastebin.com/HGSbpAHQ</a></p>