I have picture of an arrow in a div. This div is fixed in the bottom right corner of very wide page.
How can I use jQuery to scroll the window right 600px each time the div is clicked? (And is it possible to detect when the page can no longer scroll right, and hide the arrow?)
Cheers.
Try something like this:
jsfiddle here: http://jsfiddle.net/juXLu/2/
[edit] And here's detecting if you're at the end of the document http://jsfiddle.net/lukemartin/juXLu/5/
Use the jquery method scrollLeft
Something like that :)
You could user the Scrollto plugin,
http://plugins.jquery.com/project/ScrollTo
It is really easy to use, just use the documentation. Then you could create a placeholder to determine whether or not its to the end of the page. Just stick the placeholder at the very end, and calculate the distance.