Results 1 to 2 of 2

Thread: Link to Glider Page

  1. #1
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Link to Glider Page

    Hi there

    http://www.dynamicdrive.com/dynamici...tentglider.htm

    Can I use a URL link to access a specific page of my glider content?

    Thanks
    Dan
    Last edited by jscheuer1; 01-23-2012 at 02:10 PM. Reason: moved to own thread

  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

    Yes, in your on page call, use the highlighted values as shown (other values may be of your choosing):

    Code:
    <script type="text/javascript">
    
    featuredcontentglider.init({
    	gliderid: "canadaprovinces", //ID of main glider container
    	contentclass: "glidecontent", //Shared CSS class name of each glider content
    	togglerid: "p-select", //ID of toggler container
    	remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
    	selected: (function(){var s = /selected=(\d+)/.exec(location.search); return s? s[1] : 0;})(), //Default selected content index (0=1st)
    	persiststate: false, //Remember last content shown within browser session (true/false)?
    	speed: 500, //Glide animation duration (in milliseconds)
    	direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
    	autorotate: true, //Auto rotate contents (true/false)?
    	autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
    })
    
    </script>
    Once you have that - say your page with the glider on it is called glider.htm. Then from another page you may have a link like so:

    Code:
    <a href="glider.htm?selected=1">Go To Glider Page, start with 2nd content showing</a>
    Just remember that the selected is a 0 based index, so ?selected=0 is the first content, ?selected=1 is the second content, ?selected=2 is the third content, and so on. Do not select a content number higher than is available.

    And, as shown above, persistence must be set to false, otherwise a previously set cookie for the page (if any) will override your preference.

    If no ?selected=# is present, it will start with the first content (0).
    - John
    ________________________

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

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
  •