title: Difference between innerHTML and .html() from jQuery
body: <p>Can somebody tell what is the difference between jquery .html() function and innerHTML?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
              $('#test_link').click(function(){
  
                  //$('#div_test_out').html("&lt;div width='250px' height='100px' id='div_test'&gt;&lt;script language='javascript'&gt;alert('insider');&lt;\/script&gt;asddsa&lt;/div&gt;");
                  document.getElementById('div_test_out').innerHTML="&lt;div width='250px' height='100px' id='div_test'&gt;&lt;script language='javascript'&gt;alert('insider');&lt;\/script&gt;asddsa&lt;/div&gt;";      
              });
  });
  &lt;/script&gt;
  &lt;a href="#" id="test_link" &gt;TEST LINK :-)&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
  &lt;div width="100px" height="100px" id="div_test_out"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>When I use first option, that is jQuery, script inside runs, and alert shows up, but if I use second option that with the innerHTML (which I though is the same and there is no difference between them), script is not working ;-(</p>
  
  <p>What could be the cause?</p>