title: How to improve performance when rendering <table> in IE 8?
body: <p>I have a jquery function which adds  tag to first row of table.
  I tried using append, however its not working, so i got a solution which is very slow and it somehow gives error "Script on this page is causing internet explorer run slow..."</p>
  
  <p>Function is as </p>
  
  <pre><code> jQuery.fn.fixGridView = function () {
          "use strict";
         // var start = +new Date();  // log start timestamp 
          if (jQuery(this).is('table') &amp;&amp; this.find('thead').length === 0) {
  
              var theadv = "&lt;thead&gt;&lt;tr&gt;" + this.find('tbody tr:first').html(); +"&lt;/tr&gt;&lt;/thead&gt;";
  
              this.find('tbody tr:first').remove();
              var htmlv = this.html();
              this.html(theadv + htmlv);
          }
          //var end = +new Date();  // log end timestamp
         // var diff = end - start;
         // alert(diff);
          return this;
      };
  </code></pre>
  
  <p>Can anybody help me to make this code run faster?</p>
  
  <p>EDIT: I have to use IE..that is the requirement (ie8). 
  Edit2: I have created js fiddle: <a href="http://jsfiddle.net/4xLzL/" rel="nofollow">http://jsfiddle.net/4xLzL/</a></p>