title: Change class and text on jQuery AJAX success
body: <p>I have a link:</p>
  
  <pre><code>&lt;a href="#" class="confirmed" data-ev="1"&gt;
    &lt;i class="icon-pencil"&gt;&lt;/i&gt;
    &lt;span class="text-warning"&gt;confirm this!&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I tried everything in comment sections in this code:</p>
  
  <pre><code>$(".confirmed").on("click", function(e){
     e.preventDefault();
     var that  = this;
     $.ajax({
      url: '/confirmed/',
      type: 'POST',
      data: {
        event_type: $(that).data('ev')
      },
          success: function(result) {
            $(that).data('ev',"10");
            // here I want to change the class of i tag to "icon-ok"
            // and span.class to "text-success"
            // and span.text to "confirmed"
          }
    });
  });
  </code></pre>