What is wrong with this If/Else code?
<p>I have a "Change" button that makes a form active or locked when clicked. Though the button only works when I click "change", and then doesn't :/</p>

<pre><code>&lt;div class="holder"&gt;
  &lt;div class="question active"&gt;Q1&lt;input id="one" type="text"&gt;
&lt;div class="button passive"&gt;&lt;input type="button" value="Change" id="changeone"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

$('input#changeone').click(function() {
    if( $('#one').attr('readonly', true) ) {

      $("#changeone").attr('value', 'Save');
      $('div.button').parent().css('background-color', 'red');
      $('#one').attr('readonly', false);

    } else {

      $("#changeone").attr('value', 'Change');
      $('div.button').parent().css('background-color', 'green');
      $('#one').attr('readonly', true);

    }

})
</code></pre>

<p>THANKS :)</p>

<p>**corrected indentation</p>

<p>THANK YOU ALL! You all responded so quickly and I thank everyone for their time :)</p>
