View Full Version : More divs

04-22-2013, 03:08 PM
1) Script Title: Animated Collapsible DIV

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem:

I've been trying to add more animated divs to the below page. I created a new target;

<a href="javascript:animatedcollapse.toggle('band30')

and declared it to the script in the top of the page:

animatedcollapse.addDiv('band29', 'fade=1,group=people')

But for some reason the targeted images wont toggle open the div (last two bands in the left column). Is there anything else I should have doen to add more divs?


04-22-2013, 05:43 PM
You are missing the div with ID="bend29" as well as the bend30. Note that you have used id band28 multiple times. Fixing div ids will solve your problem.

04-23-2013, 10:26 AM
Thanks for the reply. I don't understand how I'm missing them, I've checked they are listed exactly like the other collapsible divs: <a href="javascript:animatedcollapse.toggle('band30')"> and both are in the top script: animatedcollapse.addDiv('band30', 'fade=1,group=people')

Is there somewhere else I should be adding them - the java file itself?

04-23-2013, 02:04 PM
I think it's because your div IDs don't match those in your JavaScript;
<!--<a href="https://soundcloud.com/djshanetobler" title="Shane Tobler on Soundcloud" target="_blank">-->
<a href="javascript:animatedcollapse.toggle('band29')"><img src="images/shane-img.jpg" alt="some_text"/></a><img src="images/shane-text.jpg" alt="some_text"/>

<div id="band13" style="width: 360px; background: #e3824c; display:none; padding: 10px; color: #555555;">
Kilkenny dj Shane Tobler returns to The Bridgebrook to milk the very last of the dancing out of Saturdays all-day festivalers. With every inch of flat surface-tables, chairs, flower-beds- in Barrys beergarden occupied by dancers last year it will be another fitting end to a great lineup of live music. <p>Bridgebrook Beergarden Sat 1st from 2pm €15</p>


<!--<a href="https://soundcloud.com/neonwolf" title="Neon Wolf on Soundcloud" target="_blank">-->
<img src="images/neon-text.jpg" alt="some_text"/><a href="javascript:animatedcollapse.toggle('band30')"><img src="images/neon-img.jpg" alt="some_text"/></a>

<div id="band14" style="width: 360px; background: #e3bf44; display:none; padding: 10px; color: #555555; background-image: url(images/music-background-two.gif);">
Things have really been hottin up for these lads with the past year seeing them play too many top Irish festivals to mention, a host of their own shows and somewhere finding the time to record several more ‘yet to be unleashed on the world’ indie-pop classics. Never forgetting their roots the boys are back at Happy Valley once again but I have a strong suspiscion we’ll be lucky to nail these lads down again next year.
<p>Murphys Beergarden Sun 2nd from 12pm €15</p>


04-25-2013, 09:50 AM
Thanks for the reply Beverleyh, I did'nt spot I had to target the div aswell as the <a> :o (the wheel is turning but the hamster is dead!) Working fine now.