const kindrex_nav_menu_trigger   = document.querySelectorAll( '.kindrex-nav-menu-trigger' ),
      kindrex_nav_menu_container = document.querySelector( '.m-menu' )

// console.log( kindrex_nav_menu_trigger[0] )

/**
 * If the nav menu trigger is clicked, open the menu,
 * However if it clicked a second time, close the menu
 */
if (kindrex_nav_menu_trigger.length > 0) {
    kindrex_nav_menu_trigger[0].onclick = function () {
        if ( kindrex_nav_menu_container.classList.contains( 'show' ) ) {
            kindrex_nav_menu_container.classList.remove( 'show' )
            return
        }
        kindrex_nav_menu_container.classList.add( 'show' )
    }
}
