I have a jQuery navigation system which when I click on the parent <li> slides using jQuery. A second press will move the navigation up. The problem is that my clients want him to also make a backup, if he clicks elsewhere on the screen, that is, just clicking on an empty space will crash the navigator.
Any ideas?
Here is the jQuery:
$('#menu-flag-menu > li > a').click(function(e) {e.preventDefault();}); $("#menu-flag-menu li a").click(function(){ // close all opened sub menus $("ul", $(this).parent().siblings()).stop(true,true).slideUp(); var ul = $(this).next("ul"); ul.stop(true,true).slideToggle('fast'); });
source share