Prototype how to parse out #anchors in document url?

Discussion in 'JavaScript' started by Helmet, Aug 8, 2008.

  1. #1
    I'm trying to use effect.ScrollTo to automatically smooth scroll to the anchor in the location bar. I can't use onclick because the link calling the anchor is on another site.

    How can I have prototype scrollto based on the url and not a link?
     
    Helmet, Aug 8, 2008 IP
  2. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    location.hash
    Code (markup):
    ?
     
    MMJ, Aug 9, 2008 IP
  3. Helmet

    Helmet Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The browser will jump to the anchored div on load by default. I need a way to intercept that event and replace it with the smooth scrolling effect.
     
    Helmet, Aug 9, 2008 IP