Results 1 to 2 of 2

Thread: Positioning pop-up div properly

  1. #1
    Join Date
    Mar 2008
    SoCal in an RV

    Positioning pop-up div properly

    I have a page with some "more info" links that, when clicked, bring up (via jQuery) a hidden div that loads in some external content. That part works great.

    BUT... if you scroll down on this page, and click a More Info link farther down, it jumps the page back to the top. Very annoying.

    So I'm wondering what I need to change in my css definition to prevent that? Right now it's this:

    position: absolute;
    display: none;
    top: 120px;
    left: 120px;
    margin: auto;


    So I'm guessing absolute probably isn't the answer, but for a div that will appear over top of the rest of the page, I'm not really sure what to use.

    Thanks for any input.


  2. #2
    Join Date
    Apr 2003
    Use the jQuery event.preventDefault() or return false to prevent the anchor's natural event.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center