maya90
July 21, 2013, 5:38am
1
am trying to build a simple nav…
thought I’d get started here,
Read Building an Interactive Navigation Bar and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more.
but I want one with sub-menus…
so based on nav at above url, I built this…
http://mayacove.com/dev/rd/nav/nav.html
only problem I’m having is the sub-menus disappear when I the mouse goes over the submenus, if I mouse out of the main link, but to empty area, then the sub-menus stay… I have looked for solutions, but anything I find regarding menus with dropdowns is always with plugins… is there a way to do this without a plugin?
thank you…
Kinwoh
July 21, 2013, 12:42pm
2
You can add $(this).delay(5000).hide(); in to js/scripts.js;
$('nav ul a').mouseleave(function() {
$('nav ul a').removeClass('selected');
$(this).addClass('selected');
$(this).siblings( $('ul') ).show();
$(this).css('border','solid 1px red');
[I]$(this).delay(5000).hide();[/I] // 5 seconds delay
});
maya90
July 21, 2013, 1:02pm
3
thank you Kinwoh…
but I don’t want to hide any links…
this totally doesn’t work…
http://mayacove.com/dev/rd/nav/nav2.html
this is done all the time with dropdown menus… so how do they do it???