title: JQuery Remove Table Row After Ajax Function
body: <p>I'm aware that there are other questions similar to this one, however the way I've executed my code is much different and so it's complicated in how I'm supposed to implement the code into the script.
  After executing an Ajax function when I click a button to delete a row, I want that row to fade out however each time I add to code to fade out there's always an error in the console.</p>
  
  <p><strong>Here is the HTML</strong></p>
  
  <pre><code>&lt;tr class="shift_type1"&gt;
      &lt;td&gt;Date&lt;/td&gt;
      &lt;td&gt;Location&lt;/td&gt;
      &lt;td&gt;Name&lt;/td&gt;
      &lt;td&gt;Time One&lt;/td&gt;
      &lt;td&gt;Time Two&lt;/td&gt;
      &lt;td class="controlbuttons"&gt;
          &lt;div class="settings"&gt;
              &lt;span class="icons"&gt;&lt;img src="http://i.imgur.com/nnzONel.png" alt="X" /&gt;&lt;/span&gt;
              &lt;span class="icons" onclick="deleteRow('rowcodehereinphp')"&gt;Delete&lt;/span&gt;
              &lt;div class="icons"&gt;Edit&lt;/div&gt;
              &lt;div class="icons"&gt;Fill&lt;/div&gt;
          &lt;/div&gt; 
      &lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p><strong>Here is the jQuery I use to delete the entry from my SQL database</strong></p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
      function fadeTr(code) {
      $(this).closest('tr').find('td').fadeOut(1000, 
          function(){ 
              // alert($(this).text());
          $(this).parents('tr:first').remove();                    
      });    
  }
  function deleteRow(code) {
          var proceed = true;
          if (proceed) {
              post_data = {'code': code};
              $.post('DeletePush.php', post_data, function (response) {
                  if (response.type == 'error') {
                      output = '&lt;div class="error"&gt;' + response.text + '&lt;/div&gt;';
                  } else {
                      output = '&lt;div class="success"&gt;' + response.text + '&lt;/div&gt;';
                  }
                  if (response.type == 'error') {
                      $("#result").hide().html(output).slideDown();
                  }
                  else {
                      $("#result").hide().html(output).slideDown().fadeTr(code);
  
                  }
              }, 'json');
          }
      };
  </code></pre>
  
  <p><strong>Console Log Error</strong></p>
  
  <pre><code>Uncaught TypeError: undefined is not a function 
  (anonymous function) 
  j 
  k.fireWith 
  x 
  b
  </code></pre>