jQuery using .html & then window.scrollTo
<p>I'm doing the following:</p>

<p>First, inject HTML into the page (a lot) which then increases the window scrollbar:</p>

<pre><code>$("#XXXX").html("LOTS OF HTML").show();
</code></pre>

<p>Then i want to scroll down to the end of the page:</p>

<pre><code>window.scrollTo(0,$(document).height());
</code></pre>

<p>Problem is the page never scrolls down. I did some console.logging and the scrollTo is running before the HTML from the inject html() is run. I tried this in the JS which injects the HTML, I then tried doing the scroll inside the HTML inject but that made no difference.</p>

<p>Any ideas?</p>
