title: Enableing and disabling a form on button click with jquery
body: <p>I am working with jquery and jquery mobile and basically I'm trying to create an edit button.  I have a form with a user's info that is all set to disabled by default.  I'd like to enable the form on click of the edit button, and then disable the form when the save button is clicked.  Here is the form: </p>
  
  <pre><code>&lt;div data-role="fieldcontain"&gt;
              &lt;label for="first_name"&gt;First Name:&lt;/label&gt;
              &lt;input type="text" name="first_name" id="first_name" value="" placeholder="First Name" disabled /&gt;
          &lt;/div&gt;
  
          &lt;div data-role="fieldcontain"&gt;
              &lt;label for="last_name"&gt;Last Name:&lt;/label&gt;
              &lt;input type="text" name="last_name" id="last_name" value="" placeholder="Last Name" disabled /&gt;
          &lt;/div&gt;
  
          &lt;div data-role="fieldcontain"&gt;
              &lt;label for="user_name"&gt;User Name:&lt;/label&gt;
              &lt;input type="text" name="user_name" id="user_name" value="" placeholder="User Name" disabled /&gt;
          &lt;/div&gt;
  
          &lt;div data-role="fieldcontain"&gt;
              &lt;label for="password"&gt;Password:&lt;/label&gt;
              &lt;input type="text" name="password" id="password" value="" placeholder="Password" disabled /&gt;
          &lt;/div&gt;
  
          &lt;div data-role="fieldcontain"&gt;
              &lt;label for="email"&gt;Email Address:&lt;/label&gt;
              &lt;input type="text" name="email" id="email" value="" placeholder="Email Address" disabled="disabled" /&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Here are my buttons: </p>
  
  <pre><code> &lt;button data-inline="true" id="edit"&gt;Edit&lt;/button&gt;
   &lt;button data-inline="true"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>And here is the jquery I've been playing with:</p>
  
  <pre><code>$(document).ready(function(){
      $('#input:edit').click(function)(){
          $('input:email').attr("disabled", false);
      }
  });
  </code></pre>
  
  <p>One thing I've noticed, which may be part of the problem, is that even when I change the code of the text inputs from disabled to enabled, they stay disabled even after I refresh the page, and I have to go back to my home page, refresh, then navigate to the user info page for them to become enabled.  So it could be some of the things I've tried would be correct if the page would update correctly.  Any help appreciated.</p>