Results 1 to 3 of 3

Thread: switchcontent script and page jump

  1. #1
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default switchcontent script and page jump

    http://dynamicdrive.com/dynamicindex...tchcontent.htm

    I use switchcontent.js on my site (www.purdue.edu/recsports) and I would like the collapsed content to open "down" on the page. Currently, if you are scrolled down at all, and you click on the header to open the content, it makes the page jump back to the top. This isn't a problem if the current page doesn't overflow but is quite confusing if you have scrolled down, clicked the header, and the page jumps back to the top. Here's an example of what I'm talking about http://www.purdue.edu/recsports/programs/boiler_challenge/courses.php. Try expanding all, scroll down, and click one of the headers.

    Does anyone know how to change this?

    Thanks!
    Last edited by ddadmin; 12-22-2010 at 08:23 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The reason the headers "jump" right now when clicked on is because they are hyperlinked. Simply remove the link inside each header, for example:
    Code:
    <h4 id="course3-title" class="handcursor"><a href="#">Combo Team Challenge Course</a></h4>
    Take out the code in red.
    DD Admin

  3. #3
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Fantastic! I have been trying to fix this for a long time but couldn't figure it out. Thank you for your help!

Bookmarks

Posting Permissions

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