SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    External scrollTo link

    Thank you in advance for your help with this.

    I have two pages. One page with thumbnails and another page with the actual gallery.

    On the gallery.html page I can scroll to my 5th image in the list by
    the following code:
    onclick="myScroll.scrollToPage(5,5)"

    I want to achieve this same effect from the index.html file into the
    gallery.html file.

    I have tried using anchored links like #image5, but that just messes
    up the page and iscroll script I am working off of.

    Thank you again anyone who can help.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,706
    Mentioned
    102 Post(s)
    Tagged
    4 Thread(s)
    You would need to link from the index page to the gallery page using the querystring to pass the info about which image you want to scroll to.

    Then, the gallery page can check the querystring for that info, and if that info exists it can pass that info to the scrollToPage method of the myScroll object.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •