PDA

View Full Version : Step Carousel Viewer navigation buttons



ic408
07-21-2008, 08:04 PM
1) Script Title: Step Carousel Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem: I would really like it so that when you are on the last panel and click "forward 1 panel" it does not send you to the first panel and vice versa for the "back 1 panel", rather I would like for it to simply not be clickable, or at least not send you away from the current panel. Any help is greatly appreciated. Thanks.

rangana
07-22-2008, 01:30 AM
Find this part in your stepcarousel.js:


stepBy:function(galleryid, steps){
var config=stepcarousel.configholder[galleryid]
if (typeof config=="undefined"){
alert("There's an error with your set up of Carousel Viewer \""+galleryid+ "\"!")
return
}
var direction=(steps>0)? 'forward' : 'back' //If "steps" is negative, that means backwards
var pindex=config.currentpanel+steps //index of panel to stop at
pindex=(pindex>config.paneloffsets.length-1 || pindex<0 && pindex-steps>0)? 0 : (pindex<0)? config.paneloffsets.length+steps : pindex //take into account end or starting panel and step direction
var endpoint=config.paneloffsets[pindex]+(pindex==0? 0 : config.beltoffset) //left distance for Belt DIV to travel to
if (pindex==0 && direction=='forward' || config.currentpanel==0 && direction=='back'){ //decide whether to apply "push pull" effect
config.$belt.animate({left: -config.paneloffsets[config.currentpanel]-(direction=='forward'? 100 : -30)+'px'}, 'normal', function(){
config.$belt.animate({left: -endpoint+'px'}, 'slow', function(){config.onslideaction(this)})
})
}
else
config.$belt.animate({left: -endpoint+'px'}, 'slow', function(){config.onslideaction(this)})
config.currentpanel=pindex
this.statusreport(galleryid)
},


Replace highlighted with:


(config.paneloffsets.length-1)


Hope it helps.

ic408
07-22-2008, 03:55 PM
Thanks for the help! I got it to work just like I wanted.

Digital.Patience
08-07-2008, 04:45 PM
:confused:

Can anyone out there please help. Last friday I DL the script and installed it on a website. I continued to add things to the content and sunddenly the panels are stuck on top of each other. Yesterday I erased the whole page and started from scratch. No matter what I do each panel keeps stacking on each other. I even viewed source on a page that a found that had the script and went line by line. I am sure it is something simple. I just need another pair of eyes. (also I am just a master at copy and paste) I am not the best programmer.

This is the link to the page I am trying to fix.


http://www.cucad.org/main.html

any help would be greatly appreciated.

rangana
08-08-2008, 02:07 AM
You should have created a new thread with this since this is relatively unrelated to the current thread. Also, when posting to another thread, see the posting format.

Digital.Patience
08-11-2008, 04:58 AM
My apologies... I am new to forums...and this was the only thing that I found about the step carousel viewer. Can someone please show me how to start a new thread or point me to the instructions. I looked at the rules... but it does not show how to start a new thread. Have mercy on a [Newbie]