Adding javascript to a menu item link
tekken - May 8, 2007 - 22:29
Hi there, I am trying to add some javascript to the menu item links using the following instructions:
http://www.harrymaugans.com/2007/03/06/how-to-create-an-animated-sliding...
I already messed around with the menu.inc but it aint working yet. What i want to do is add a slide effect to the changing content div when someone clicks a menu link.
Any suggestions?

Got to use Jquery?
I think I'll have to use jquery to call the content from the database. This content should then be displayed in the sliding div.
But I have no idea on how to achieve that and I find the Drupal/Jquery documentation rather unsatisfying.
There are module that do change the way the menu works
It is not clear what you want to achieve, the link is about showing/hiding a div, not the way menus work. If you want to change the way the menu is seen you might want to look at one of the modules that applies javascript to them, DHTML Menu, Lucid menu, Activemenus (part of Javascript Tools) and for something a little different Block Bar
this should be simple
I want to toggle the visibility of the div when clicking on a menu item. My guess was that jquery would help for adding the desired node-content to the div.
Which div?
Your statement implies you want to change the viewed node using jQuery and AJAX, not something Drupal does out of the box. There are some risks in that are page elements may normally change when viewing different content. Also, not all menu links display node based content so that may be an issue.
Which div?
Opps, dup
You got it
Yes that's what I want to do. I mean the main div where the node content is displayed.
I understand the risks you mentioned, however that shouldn't be a problem if I limit the use of jQuery to few nodes only. What would I have to change to add jQuery calls to a menu link