![]() |
jQuery help
Heya!
I'm trying to make a menusystem that supports up to 2 submenus. The PHP code looks like this: php Code:
I've set classes sub and sub2 to display: none in CSS. What I want is that when the user clicks a link, the submenu that belongs to that link is rolled out. The $links variable is an array with all the menus, and it's quite long, but here it is: php Code:
I didn't know any better way of marking the submenus than by putting the index to SUB-<nameoflinkitbelongsto>. Don't know how I would proceed from here though to make the JS part work. Any tips or ideas would be appreciated! |
@tanax jQuery, has a forum for jQuery support ;) just thought i should share that info.. :)
-Cf |
jQuery is really easy. I dont have time to look through your code in details, but as an example...on hovering the div with id submenu, submenu layer will display and on mouse out will be hidden again. Also using animation functions like slideDown & slideUp you can animate the display of the drop down menu
$('#submenu').hover( function() { // show menu }, function() { // hide menu } ); |
Quote:
Quote:
What I need help with first is how I can solve the array format so I can create nice ID's to output :-) |
@tanax, must have mixed up with something else, but i still know a jquery forum but, i see that you are already a new member of just that forum so all is well :)
-Cf |
Quote:
|
you are welcome :)
|
| All times are GMT. The time now is 01:31 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0