The anti-spam plugins have stopped being effective. Registration is back to requiring approval. After registering, you must ALSO email me with your username, so that I can manually approve your account.

Main Menu

dropdown menus...

Started by gopus, March 08, 2007, 09:34:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hey, I'm trying to remake my site ( ), and I want to implement dropdown menus via javascript. I want to have the dropdown links show up UNDER the menu, so I want to alter the placement of the dropdown div respective to the menu div via javascript. I am not entirely sure how to do this, but I tried to do something like the following:

   document.getElementById('comicpulldown') = document.getElementById('comicslink');
   document.getElementById('comicpulldown').style.left = document.getElementById('comicslink').style.left;

Where 'comicpulldown' is the div with the list of comics, and 'comicslink' is the actual menu the mouse hovers over to get the list. The values of comicslink do not impute onto comicpulldown so I am not entirely sure what to do. Not sure what the issue is, and it seems as if javascript/dhtml/etc. tutorials are progressively diminishing on the internet (good ones anyway).


I suggest using an existing library out there for this. There's no need to reinvent the wheel for things like drop down menus, which are a pain in the butt to make work in backwards compatible environments as well.

On a side note, I've found that for many things javascript related, jQuery is a pretty hot little library with a pretty small footprint and powerful as hell.
(\_/)    ~Relakuyae D'Selemae
(")_(")  [Libre Office] [Chrome]


I solved the problem. Thanks anyway Databits, and I appreciate the jQuery link.