title: Cannot setAttribute for dynamically loaded text
body: <p>I'm trying to import records from a database and apply a class to those records. The records are imported properly, but I lose the class reference and the css for the imported text. I try to reset the attribute, but it does not take. 
  Notice that I've commented out the line that imports the text from the database: </p>
  
  <pre><code>document.getElementById("tablesorter-demo").innerHTML=xmlhttp.responseText;
  </code></pre>
  
  <p>When I do this, the existing html text works properly. How can I import the text and apply the class (i.e. apply the tablesorter class") and the css to the imported text?</p>
  
  <pre><code>getElement.setAttribute("class", "tablesorter");
  </code></pre>
  
  <p>Thanks for your time!</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
   &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"&gt;
   &lt;head&gt;
  &lt;title&gt;Tablesorter&lt;/title&gt;
  &lt;link rel="stylesheet" href="styles.css" type="text/css" media="print, projection, screen" /&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;   &lt;/script&gt;
  &lt;script type="text/javascript" src="__jquery.tablesorter.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(function() {      
      $("#tablesorter-demo").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});
      $("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter: false}, 4:{sorter: false}}});
  }); 
  
  window.onload = function() { 
      if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  
          xmlhttp=new XMLHttpRequest();
      }else {// code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      xmlhttp.onreadystatechange=function(){
          if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){
              //console.log(xmlhttp.responseText);
              //document.getElementById("tablesorter-demo").innerHTML=xmlhttp.responseText;
              var getElement = document.getElementById("tablesorter-demo")
              getElement.setAttribute("class", "tablesorter");
              getElement.setAttribute("border", "1");
          }
      }
      xmlhttp.open("GET","createTableList.php",true);
      xmlhttp.send();
  }
  &lt;/script&gt;
     &lt;/head&gt;
   &lt;body&gt;
   &lt;div id="main"&gt;
   &lt;table id='tablesorter-demo' &gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Login ID&lt;/th&gt;
              &lt;th&gt;First Name&lt;/th&gt;
              &lt;th&gt;Last Name&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;120&lt;/td&gt;
              &lt;td&gt;Jenny&lt;/td&gt;
              &lt;td&gt;Jones&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;121&lt;/td&gt;
              &lt;td&gt;Billy&lt;/td&gt;
              &lt;td&gt;Bob&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
   &lt;/table&gt;
   &lt;/div&gt;
  
   &lt;/body&gt;
   class&lt;/html&gt;
  </code></pre>