tags:

views:

17

answers:

3

I have a simple website, but I have a jquery function when a button is clicked, a list slides down. But I would have to scroll to see the list. How can I have it auto-scroll down when the page gets to long?

+1  A: 

Depending the nature of your custom scroll button, perhaps you could implement it as an anchor link which jumps the page to just above the pane it scrolls?

<a class="my-scroller" href="#scrollPane">Scroll Down</a>
<div id="scrollPane">
</div>

If you are unable to use an <a href="" /> as your scroll button, you could instead have the click handler for your scroll button also change the page's location.hash value to the ID of your scroll pane.

$(".my-scroller").click(function() {
    location.hash = "#scrollPane";
    // scrolling code
});
Nathan Taylor
A: 

There's an automatic left-to-right scrolling plug-in here: http://plugins.jquery.com/project/SmoothDivScroll

sdtechcomm
A: 

This jQuery plugin can be of some use for you: http://plugins.jquery.com/project/ScrollTo

Alfabravo