Help with Expanding Menu

mrad / 2009-11-13 21:11:10   

Ok so I think I have followed the instructions but obviously have missed something.
I have created an expandingMenu.js as follows:

$(document).ready(function()
{
// First we hide all exhibitis
$("#menu ul li.section-title").nextAll().hide();
// then the active exhibit is showed
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
});
// This is the toggle function
// first it hides all sections
$("#menu ul li.section-title").click(function()
{
$("#menu ul li.section-title").nextAll().hide(500).animate({easing:"linear"});
$(this).nextAll().show(500);
});
});

Then in my Index.PHP I replaced:

*script type='text/javascript'>
path = '/files/gimgs/';

$(document).ready(function()
{
setTimeout('move_up()', 1);
});
*/script>

With this:

*script type='text/javascript'>
path = '/files/gimgs/';

$(document).ready(function()
{
setTimeout('move_up()', 1);
expandingMenu(0);
expandingMenu(1);
expandingMenu(2);
expandingMenu(3);
expandingMenu(4);
expandingMenu(5);
expandingMenu(6);

});
*/script>

I'm using jQuery JavaScript Library v1.3.2.

Am I missing something because it is not working on my site: M-RAD

Thanks in advance!

arsondpi / 2009-11-14 08:50:18   

You realise that you have to type < instead of * ... and you have a double tag:

  1. <script type='text/javascript'>
mrad / 2009-11-14 09:36:01   

Ok thanks. Sorry silly mistakes. I've fixed the erros in the sript but I'm still not getting anything happening with the expanding menus. All the lists in the menus are always visible... Any other idea what I might be doing wrong?
My site: M-RAD

Thanks again!

lemathieu A / 2009-11-14 10:18:31   

you're not "calling" the js for your expanding menu

add this :

  1. < script type='text/javascript' src='http://www.m-rad.com/ndxz-studio/site/js/expandingMenu.js'>< /script>

This thread has been closed, thank you.