Results 1 to 3 of 3

Thread: Changing Layer contents causes page to jump

  1. #1
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Changing Layer contents causes page to jump

    I currently am working on a site and they would like to have a bunch of tetimonials available. Because their layout is very limited I thought it would be nice to have a layer that changes the testimonial text when the user clicks on an image.

    When they do this, though, the page jumps to the top. does anyone know how to stop this?

    You can see the page I am working on at www.communitykollel.org/indextest.htm

    Scroll down and click on the thumbnails.


    thanks!!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Where you have this (and similar):

    HTML Code:
    <A href=# onClick="changeText('mytest',1);">
    It should be like:

    HTML Code:
    <a href="#" onclick="changeText('mytest',1);return false;">
    Even better would be to skip the link altogether and to assign style and the event to the image something like so:

    HTML Code:
    <img style="cursor:pointer;border:3px solid cyan;" onclick="changeText('mytest',1);this.style.borderColor='purple';" src="images/testimonials/avrum_small.jpg" name="avrum" width="90" height="90" alt="">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks!!!

    Your suggestions worked perfectly.

    Daiv

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
  •