JS page jump to pixel

Discussion in 'JavaScript' started by ErectADirectory, Apr 1, 2008.

  1. #1
    Hello js'ers,

    So after looking around frantically for something I don't think exists, I figured I've give you guys a shout.

    Everyone is familiar with internal html page link jumps where you click a link and it takes the html to a predefined spot on the page. An example would look like this.

    
    <a href="#jumphere">clickme</a>
    
    <a name="jumphere"></a>
    
    HTML:
    If you were to click "clickme" in the above it would take the page to the spot that is referenced by name="jumphere" in the html.

    What I am trying to do is work something out where when you click "clickme" it jumps to a predefined height marker of the page. Like click it and it jumps the page down to 800px from the top.

    Any suggestions as to how to go about doing this??? I posted in html also, but I'm thinking javascript gives the kind of control for "on the page" custom scripting that I will need to accomplish this.

    Thanks for reading, and thanks in advance for your assistance getting this figured out.
     
    ErectADirectory, Apr 1, 2008 IP
  2. temp2

    temp2 Well-Known Member

    Messages:
    1,231
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    2
    #2
    1. jumphere is at position far away from top about 800px

    2. Some JavaScripts happen when you click #jumphere
     
    temp2, Apr 1, 2008 IP
  3. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hogan_h, Apr 2, 2008 IP