title: Dynamically disabled button not changing visually?
body: <p>So basically we have a button that when clicked, its value should change and it should be disabled. Our button goes from<br /><br /> <code>&lt;input class="saveButton" name="yt26" type="button" value="save" id="yt26"&gt;</code><br /><br />
  to<br /><br />
  <code>&lt;input class="saveButton" name="yt26" type="button" value="saved" id="yt26" disabled&gt;</code>
  <br /><br />
  Unfortunately, the button does not change visually until the page is refreshed. We're changing the button using the <code>$(this).attr("disabled","disabled")</code> We have also tried <code>$(this).prop("disabled", true)</code> and <code>$(this).prop("disabled","disabled")</code> none of which seem to work. If you are familiar with Yii, the whole button code is posted below:</p>
  
  <pre><code>echo CHtml::ajaxButton(
              'save', 
              Yii::app()-&gt;createUrl('dashboard/savelink'),
              array( // ajax options
                  'type' =&gt; 'POST',
                  'context' =&gt; "js:this",
                  'success' =&gt; 'js:function() {$(this).attr("disabled", "disabled"); $(this).val("saved") ;}',
                  'data' =&gt; array(
                      'commentLink' =&gt; $commentLink
                  )
              ),
              array(
                  'class'=&gt;'saveButton'
              )
          );
  </code></pre>
  
  <p>Thanks in advance,<br />J</p>