title: display:none breaking formatting when a html page is loaded inside the div through ajax?
body: <p>I've a div that uses <code>display:none</code> which hides the element without breaking any page formatting/layout. However, if I get another html page using ajax and set the innerhtml of that div using jQuery during document.ready() event, then the formatting breaks. </p>
  
  <p><strong>Please note that if you comment out the code inside ** **, the formatting doesn't break.</strong> </p>
  
  <p>Firebug doesn't show any JS errors. </p>
  
  <p>Here's the ajax and setting the content code:</p>
  
  <pre><code>        var htmlStuff;
          $.ajax({
            url: "temp.html",
            cache: false,
            success: function(html){
                 htmlStuff= html;
                 **$('#myDiv').html(htmlStuff);**
            }
          });
  </code></pre>
  
  <p>Here is the div: </p>
  
  <pre><code>&lt;div id = "myDiv" style="display:none"&gt;&lt;/div&gt;
  </code></pre>