Is there a way to prevent the menu from moving up when I click inside the submenu? (The submenu will slide up when you click on the main link or outside of it.) Is it possible to achieve this without using javascript? And then have the menu overlap and function with hover if javascript is disabled.
SOLUTION:
$('.nav > ul').toggleClass('no-js js');
$('.nav .js ul').hide();
$(document).on("click", function(e) {
var $elem = $(e.target);
if ($elem.hasClass('clicker')) {
$('.nav .js ul').not($elem.next('ul')).hide();
$elem.next("ul").slideToggle();
} else {
$('.nav .js ul').hide();
}
})