Hello DD
I am starting a new gallery again but before i do how can i make Demo #1 (link below) loop slowly, continually as well as having controls.
What do i need to edit in the Javascript?
http://www.dynamicdrive.com/dynamici...epcarousel.htm
jelly
Hello DD
I am starting a new gallery again but before i do how can i make Demo #1 (link below) loop slowly, continually as well as having controls.
What do i need to edit in the Javascript?
http://www.dynamicdrive.com/dynamici...epcarousel.htm
jelly
I'm not sure what you mean when you say "loop slowly" - the rotation speed or slide animation speed?
If you go to the bottom of the script demo page there is a table of parameters with descriptions/explanations for what they do.
The 2 parameters that affect speed (of different aspects of the script) are;
- "autostep", where you would edit the pause value to change the pause speed between rotations.
- "panelbehaviour", where you would edit the speed value to set the duration of the slide animations.
Change the value of each to get the speed effect you desire.
To make the slideshow rotate continuously, it looks like you would use the "panelbehaviour" parameter again and set the wraparound to true.
You will need to add the parameters to the JavaScript initialisation script if they are not already included but you can refer to the other demos to see how that's done.
The demos are pretty easy to setup though so copy and paste one into a sample page and fiddle with the settings (using the parameter descriptions for guidance) til you get the effect you're after.
For any more help, please setup your sample page and provide a link to that.
Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) |
The only limit to creativity is imagination: JemCon.org
You don't need to edit the javascript. As Beverley says, you need to setup the on page init of the gallery with the properties that you want, for example:
The only thing you cannot setup there is to have it keep going after one of the nav or page images is clicked. To do that, add right after the on page init:Code: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:3000}, panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true}, defaultbuttons: {enable: true, moveby: 1, leftnav: ['leftnav.gif', -5, 80], rightnav: ['rightnav.gif', -20, 80]}, statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file'] })
Notice the red mygallery in both of these. It's the id of the gallery and must be the same in both places.Code:jQuery(function($){ var mygal = stepcarousel.configholder.mygallery, $page = mygal.$paginatediv, $nav = mygal.$leftnavbutton.add(mygal.$rightnavbutton).add($page.find('img')); $nav.click(function(){ mygal.steptimer=setInterval(function(){stepcarousel.autorotate(mygal.galleryid)}, mygal.autostep.pause); }); });
Demo:
http://home.comcast.net/~jscheuer1/s...ousel/demo.htm
Use your browser's "View Source" to get the code.
Any questions, feel free to ask.
One thing this script cannot do though is move continuously from the last image to the first image. Well it can and does, but you might be thinking in terms of advancing to the first image. What it does is rewind to the first image. If you want a continuously advancing script, you would either need a (probably major) rewrite of this script or another script. There probably already is another script that does that. I'm just not sure which one(s) are available that do that.
But if you don't mind the rewind motion from last to first, after all it's what this script does, you're all set.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks