Log In · Register

 
Accordian Menu Script, How to's?
theerinkal
post Mar 14 2009, 11:53 PM
Post #1


Irrisistable Cabbages.
*****

Group: Member
Posts: 549
Joined: Nov 2007
Member No: 589,355



I want to add an accordian menu script to my site because I think it'll be more efficient then just having the other links that people have. I know that you need a sdmenu.js file and all that but I have no clue on how to add it to my site and make it so that when people click on the headers it shows you all of the 'daughter' links.

If you don't know what I'm talking about. I want the script to be just like the one on this site.

Please help. If there are any tut's on here please link them for me. I've been searching google but that's no help.
 
 
Start new topic
Replies
theerinkal
post Mar 15 2009, 01:25 PM
Post #2


Irrisistable Cabbages.
*****

Group: Member
Posts: 549
Joined: Nov 2007
Member No: 589,355



It doesn't work.

Live Preview (top left nav box)

I have the navigation code (second codebox) in a div id box is that the problem?


CODE
<head><script type="text/javascript" src="/path/to/sdmenu.js"></script>
<script type="text/javascript">
// <![CDATA[
var myMenu;
window.onload = function() {
myMenu = new SDMenu("my_menu");
myMenu.init();
};
// ]]>
</script></head>


CODE

<div id="my_menu" class="sdmenu">
<div class="collapsed">
<span>Header 1</span>
<a href="URL">Link</a>
<a href="URL">Link</a>
<a href="URL">Link</a>
</div>
<div class="collapsed">
<span>Header 2</span>
<a href="URL">Link</a>
<a href="URL">Link</a>
<a href="URL">Link</a>
</div>
</div>
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: