You can create your own "jump to" function for this script relatively easily. Firstly, you need to make a small change to your initialization code so the options object passed into the init() function is saved as a variable first, for example:
Code:
var gliderconfig={
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: 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]
}
featuredcontentglider.init(gliderconfig)
In other words, first assign the config object to an arbitrary variable, then pass that variable into the init() function, instead of the way method of just directly passing this object into the function.
With that done, add the below function following the above:
Code:
function gotoslide(config, pagenum){
featuredcontentglider.glide(config, pagenum)
featuredcontentglider.cancelautorotate(config.togglerid)
}
Then, to get the glider to go to a specific slide via regular links, do something like:
Code:
<a href="javascript:gotoslide(gliderconfig, 0)">Page 1</a> <a href="javascript:gotoslide(gliderconfig, 1)">Page 2</a>
You'd call gotoslide(gliderconfig, 0) with the first parameter being the variable containing the config object for the glider in question, and the 2nd parameter a number corresponding to the page you wish to load (0=1st page etc).
Bookmarks