39 lines
739 B
JavaScript
39 lines
739 B
JavaScript
var $uperLevel = $(".up-level");
|
|
|
|
resetMenu = function(){
|
|
$($uperLevel).removeClass('hover');
|
|
}
|
|
|
|
hideonMobile = function(){
|
|
$('a[href*="#"]').each(function() {
|
|
$(this).addClass('hideonmobile');
|
|
});
|
|
}
|
|
|
|
addMobileMenu = function(){
|
|
var $menu = $(".cssplayMenu");
|
|
var menutext = "<div class='menu-tougle'><span class='menu-tougle__inner'></span><span class='menu-tougle__inner'></span><span class='menu-tougle__inner'></span></div>"
|
|
$menu.prepend(menutext);
|
|
$($menu).bind("click",function(){
|
|
$($menu).toggleClass('active');
|
|
resetMenu();
|
|
} );
|
|
|
|
|
|
}
|
|
|
|
preventClickUperLevel = function(){
|
|
$($uperLevel).bind("click",function(){
|
|
$(this).preventDefault();
|
|
} );
|
|
|
|
}
|
|
|
|
preventClickUperLevel();
|
|
// hideonMobile();
|
|
addMobileMenu();
|
|
|
|
|
|
|
|
|