Scroll the page with JavaScript

In that case I need to scroll my page onclick event to show the fully loaded content in a <div>, which just loaded content.

That can be done with window.scrollBy(x, y). Where if you’d like to scroll vertically you’ve to change the y value.

Related posts:

  1. Scroll an IFRAME Content to a Predefined Position
  2. reload the page with javascript
  3. Flash doesn’t load in div with display:none style
This entry was posted in javascript, web development and tagged , . Bookmark the permalink.

One Response to Scroll the page with JavaScript

  1. azzie says:

    I just used that :-D

    But I wonder. . . why do U need to show the whole content? U need a preview of the page or there’s another reason???

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">