const btnNavEL = document.querySelector(".btn-mobile-nav"); const headerEL = document.querySelector(".header"); const menuEL = document.querySelector(".hamburger"); menuEL.addEventListener("click", function () { headerEL.classList.toggle("nav-open"); menuEL.classList.toggle("is-active"); }); /*-------------------------------------------------- Project: blogkaro Version: 1.0 Author: Gourav bagora ----------------------------------------------------- JS INDEX ================================================ * Scrolling tab menu * Main Home Slider * Testimonial slider * Project Slider * Page Loader * Scroll To Top * Counter * Google-Map ================================================*/ (function (jQuery) { "use strict"; jQuery(document).ready(function () { jQuery(".navbar-nav").accessibleDropDown(); }); jQuery.fn.accessibleDropDown = function () { var el = jQuery(this); /* Make dropdown menus keyboard accessible */ jQuery("a", el) .focus(function () { jQuery(this).parents("li").addClass("force-show"); }) .blur(function () { jQuery(this).parents("li").removeClass("force-show"); }); }; })(jQuery); (function($) { // Begin jQuery $(function() { // DOM ready // If a link has a dropdown, add sub menu toggle. $('.main-nav ul li a').click(function(e) { $(this).siblings('.sub-menu').toggle(); // Close one dropdown when selecting another // $('.sub-menu').not($(this).siblings()).hide(); e.stopPropagation(); }); // Clicking away from dropdown will remove the dropdown class //$('html').click(function() { // $('.sub-menu').hide(); //}); // Toggle open and close nav styles on click $('#nav-toggle').click(function() { $('nav ul').slideToggle(); }); // Hamburger to X toggle $('#nav-toggle').on('click', function() { this.classList.toggle('active'); }); }); // end DOM ready })(jQuery); // end jQuery (function($) { // Begin jQuery $(function() { // DOM ready // If a link has a dropdown, add sub menu toggle. $('.main-nav ul li ul li a').click(function(e) { $(this).siblings('.sub-menu li a .sub-menu').toggle(); // Close one dropdown when selecting another // $('.sub-menu').not($(this).siblings()).hide(); // e.stopPropagation(); }); // Clicking away from dropdown will remove the dropdown class // $('html').click(function() { // $('.sub-menu').hide(); // }); // Toggle open and close nav styles on click $('#nav-toggle').click(function() { $('nav ul').slideToggle(); }); // Hamburger to X toggle $('#nav-toggle').on('click', function() { this.classList.toggle('active'); }); }); // end DOM ready })(jQuery); // end jQuery