PDA

View Full Version : Step Carousel - dynamically load panels and stop autostep



neil123
10-05-2010, 08:34 AM
1) Script Title:
Step Carousel Viewer

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

3) Describe problem: Clicking a panel dynamically loads a new set of panels but I can't seem to also disable autostep when the new panels are loaded.

Hello,

Newbie JS user here and I'm in over my head!

I'm using step carousel viewer to scroll through 5 panels each representing a section of a photo gallery. Upon clicking one of the panels, all the panels are reloaded via:

onclick="stepcarousel.loadcontent('mygallery', 'Alternate Panels/Test2.html')

A table of images corresponding to the panel clicked is loaded into the current panel while all other panels remain the same (they are all reloaded but simply link the same images).

The trouble is that I can't seem to also disable autostep when the new panels are loaded. I tried including a stopautostep function call in with the 'onclick' event handler but it didn't work. I can get the desired result if I only include one panel in 'Test2' but then I can't 'stepto' the other showcase sections of the gallery using my pagination images because those sections no longer exist.

Any ideas on how to both reload the contents of the panels, and stop autostep upon clicking a panel would be very much appreciated.

Thanks
Neil

ddadmin
10-05-2010, 05:29 PM
Inside stepcarousel.js, try finding the below chunk of code, and add to it the line in red:


loadcontent:function(galleryid, url){
var config=stepcarousel.configholder[galleryid]
config.contenttype=['ajax', url]
config.autostep.enable=false
stepcarousel.stopautostep(config)
stepcarousel.resetsettings($, config)
stepcarousel.init(jQuery, config)

},

neil123
10-06-2010, 01:48 AM
Works like a charm!

Thanks

barf
01-26-2011, 02:20 PM
Hi. I have a swf in panel 1 and a jpg in panel 2.

When I click the jpg in panel 2 the carousel stops but when i click the swf in panel 1 it does not - the carousel starts autostepping again while the swf keeps playing if i mouse out. The audio runs while the swf gets autostepped out of view.

What javascript call could i add to the swf to make the carousel stop on the swf?

I can't find where in the .js file the stopping of the autostep happens when you click an image.

TIA.. :p