What you're asking for is probably best accomplished via a query. Like if you were to go (or link) to:
luminousshade.com/index.html?panel=3
Like (on a file like your MainPanel/Main.html for the other Carousels that you haven't made yet):
Code:
<a href="index.html?panel=3>Text or <img> tag</a>
or:
Code:
<a href="?panel=3>Text or <img> tag</a>
The Carousel would go to the third panel (Accessories).
You can do that with PHP if your sever is PHP enabled. But chances are you would have to change the file to index.php. Since the Carousel depends upon javascript anyway, you may use javascript to grab the query (additions to your current code highlighted):
Code:
<script type="text/javascript">
stepcarousel.getQval = function(n){
if(typeof n !== 'string'){
return null;
}
var r = new RegExp('[?&;]' + n + '=([^&;#]*)'), m = location.search;
return (m = r.exec(m))? unescape(m[1]) : null;
}
stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:5000},
panelbehavior: {speed:1000, wraparound:true, wrapbehavior:'slide', persist:true},
defaultbuttons: {enable: false, moveby: 1, leftnav: ['', -5, 80], rightnav: ['', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['ajax','MainPanel/Main.html'],
oninit:function(){
jQuery('#mygallery a[rel*=facebox]').facebox(),
this.$toclinks=jQuery('.toclinks') //get all links with "toclinks" class
var panel;
if((panel = stepcarousel.getQval('panel'))){
stepcarousel.stepTo(this.galleryid, panel);
}
},
onslide:function(){ //function that swaps the paginated BG/margin onslide
for (var i=0; i<statusC; i++){//for all panels
var j = i+1;
if (i==sta . . .
Bookmarks