Javascript Reference
Categories: window

javascript window scrollBy( )

@March 15, 2008, 1:22 a.m.
scrollBy( )Firefox/Netscape/NN 4 IE 4 Chrome/Safari/DOM n/a  

scrollBy(deltaX, deltaY)

  

Scrolls the document in the window by specified pixel amounts along both axes. To adjust along only one axis, set the other value to zero. Positive values for deltaX scroll the document to the left (so the user sees content to the right in the document); negative values scroll the document to the right. Positive values for deltaY scroll the document upward (so the user sees content lower in the document); negative values scroll the document downward. Scrolling does not continue past the zero coordinate points (except in Navigator 4 for the Macintosh).

 
Parameters
 
  • Positive or negative pixel count of the change in horizontal scroll position.
  • Positive or negative pixel count of the change in vertical scroll position.
 
Returned Value

None.


Powered by Linode.