How to scroll to bottom of div when using slidetoggle?
<p>Let's say I have a button that slidetoggles a div under when I click the button. The div has a height higher than the screen so a vertical scroll bar becomes visible in the browser. When I display the div I want to scroll to the bottom of the page but cant get it to work. I tried something like:</p>

<pre><code>$('#button').click(function() {
 $('#MyDiv').SlideToggle();
   if($(this).hasClass('open')) {
          $(html).animate({ scrollTop: $(document).height() }, "slow");
    }
});
</code></pre>

<p>I have loaded jquery and jquery.scrollto.</p>

<p>Any ideas?</p>

<p>What happens is that the div is toggled but no scrolling performed.</p>
