Expanding menu and drag and drop

Juwi / 2010-01-10 22:55:04   

Hi, thanks for your fast answers lately. It´s great to see how good communication works here.

I got trying to make an expanding menu but it doesn´t work.
I first create a new expandingMenus.js with this script:

$(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();
$(this).nextAll().slideToggle("fast");
});

});

and put it into my "js" folder.
In the index.php I added those lines:


path = '/files/gimgs/';

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

});

and actually it should work. I also added some lines to make my menu moveable. Maybe thats the reason that it doesn´t work. Maybe I just changed the order wrong or forgot something. I know it will be just a small thing but I am getting sick of making out the problem.

Thanks for your help!
Judith

Juwi / 2010-01-10 23:06:30   

Oh my english! Sorry for this! I add a part of my index.php that you can see what I changed and added.

...



$(function(){
    // add drag and drop functionality to #box1
    $("#menu").easydrag(true);
 
// set a function to be called on a drop event
    //$("#box1").ondrop(function(e, element){ alert(element + " Dropped"); });
});


path = '/files/gimgs/';

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

});




menue




  • Copyright ¬©2009 All rights reserved.
  •     





    and this is my site
    judithwill.de

    -Judith

    Juwi / 2010-01-10 23:11:58   

    Oh man there are lines missing in the script. How can I put my whole script here that you can see it? An instruction for an idiot, please.

    This thread has been closed, thank you.