PDA

View Full Version : Help needed, Multiple toggler divs - Featured Content Glider.



exDee/Pressure
09-29-2008, 01:49 PM
Heya, found the awesome featured content glider on the dynamic drive script page. Got a little problem that I need some help with.

Ill just assume those reading this knows a thing or two, so uh yea.

Link to the script
http://www.dynamicdrive.com/dynamicindex17/featuredcontentglider.htm

This is the init script of the glider from my index. My problem is that I need to toggle content from multiple divs, something that wasnt brought up on the page. I need to have more then just that "test" one, and I need them to open in the same glider div (glidecont)


<script type="text/javascript"> // glide scriptet

featuredcontentglider.init({
gliderid: "glidecont", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerid: "test", //ID of toggler container
remotecontent: "Portfolio/glidecontent.php", //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]
})


</script>

Ive tried things like togglerid: "test, test2", etc and I tried using two instances of the glider (as show in the example on the last page) with the same gliderid.

Perhaps not sufficient information but thats all I could think of.

I really need some insight on this asap, would appreciate some help.

the penguin
09-29-2008, 02:43 PM
Might you have a link to the live file?

exDee/Pressure
09-29-2008, 03:18 PM
Im afraid not. We're working locally.

To clarify the problem; Is there any way to have multiple toggler div's or not?

the penguin
09-29-2008, 04:20 PM
I'm still not sure what you mean. Correct me if i'm wrong but isn't that script already providing multiple div's that toggle?

exDee/Pressure
09-29-2008, 04:50 PM
As I said, I've tried to make multiple divs with togglers in them, all opening stuff in the same glider.
Nothing worked so far, and since there aren't any examples on the script page with what I need I've hit the wall.

Think of it as multiple controls for the glider, but in diffrent divs. Thats what Im trying to accomplish.

the penguin
09-29-2008, 05:00 PM
Are you saying you couldn't get that script to work correctly? If that's the case then paste all your code here and i'll have a look and see if you missed something.

exDee/Pressure
09-29-2008, 05:16 PM
The script works fine, but I cant use more then one div containing togglers. Or rather, I dont know how to do that.
Look, I think I've stated the problem several times by now. Or am I missing something here?

the penguin
09-29-2008, 05:32 PM
Actually, can you state your problem one more time?

exDee/Pressure
09-29-2008, 05:43 PM
What are you serious? If you're trying to help, thats fine and I appreciate it. But read what I've written in the last 4 posts again please..

Are you even familiar with the script?

I cant use more then one div containing togglers

ddadmin
09-29-2008, 08:12 PM
Hmm there's no easy way to do this with the script at the moment unfortunately. If I have time, I'll try and revisit this thread sometime this week to see if I can make the necessary modifications. But no promises. :)

exDee/Pressure
09-29-2008, 08:41 PM
That'd be sweet. Thanks for your consideration.

exDee/Pressure
10-06-2008, 04:49 PM
Any news on this? ^^ Would be really neat if you could help me to make it work.

ddadmin
10-07-2008, 04:42 AM
Sorry for the delay, this turned out to be a lot more complicated than I had anticipated. Anyhow, try the below modified .js file. You'll also need to modify your configuration code so instead of using the "togglerid" parameter, you should now use "togglerids" with an array of toggler IDs:


featuredcontentglider.init({
gliderid: "canadaprovinces", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerids: ["p-select", "p-select2"], //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: true, //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: [1000, 1] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})

exDee/Pressure
10-08-2008, 05:35 PM
Thank you so much...Everything worked like a charm. Cant express my grattitude enough.
You're the man.