HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/signmania.komma.pro/wwwroot/js/mobileNavigation.js
/**
 * Created by Pascal on 01/12/16.
 */

$(function(){

    $('.navigation').click(function (event) {
        if(event.target.tagName == 'NAV')  disableMobileMenu();
    });


    $('.toggle-menu').click(function(){
        if( ! mobileActive){
            enableMobileMenu();
        }
        else{
            disableMobileMenu();
        }
    });

});

// Add allow animation class to prevent blinking when website opens
$('.navigation').addClass('allow-animation');

var scrolled = 0;
var mobileActive = false;

function enableMobileMenu() {
    scrolled = $(window).scrollTop();
    $('.navigation').addClass('active').addClass('top-fade-out');
    $('.toggle-menu').addClass('active');
    mobileActive = true;

    //Add the fixed position after Mobile menu animation
    // setTimeout(function(){
    //     $('body').addClass('preventScroll');
    // }, 400);

}

function disableMobileMenu() {

    $('.navigation').removeClass('active');
    $('.toggle-menu').removeClass('active');

    //$('body').removeClass('preventScroll');
    mobileActive = false;
    $(window).scrollTop(scrolled);

    setTimeout(function(){
        $('.navigation').removeClass('top-fade-out');
    }, 400);
}