1) Script Title: ddaccordion
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ordionmenu.htm
3) Describe problem: Im trying to dynamically set the onemustopen variable depending on what accordion group.
For instance I have 2 sets of accodiron called accord1 and accord2 (imaginative i know.) I happen to have these nested like tabs in one row,
I want to allways display the content of at least one set.
So i figure i'd probably have to do some kind of onclick="onemustopen=true" somewhere but i dont know how to specificy to which groups of tabs
at the moment i have buttons like this...
Code:<div class=accord1" onclick="ddaccordion.collapseall('accord2')">1</div> <div class=accord1" onclick="ddaccordion.collapseall('accord2')">2</div> <div class=accord1" onclick="ddaccordion.collapseall('accord2')">3</div> <div class=accord2" onclick="ddaccordion.collapseall('accord')">4</div> <div class=accord2" onclick="ddaccordion.collapseall('accord')">5</div> <div class="content1">content 1</div> <div class="content1">content 2</div> <div class="content1">content 3</div> <div class="content2">content 4</div> <div class="content2">content 5</div>
I wish i could have it so all the tabs where in one group, it would make my life a lot easier, but alas, we dont know how many of group1 will be needed on each individual page so to open group 2 with i am coding a counter to make this easy for me, but it juist hasnt worked yet, perhaps there is a call to count the tabs?



Reply With Quote
Bookmarks