muktoapb
9/3/2018 - 10:25 AM

jQuery Menu

Simple jQuery code for menu

//header will add a class after scroll little bit

\!h //give class name 'header_area' then below code will add a class name 'stiky' with it

 $(window).scroll(function () {
      if ($(this).scrollTop()) {
          $('.header_area').addClass('stiky');
      } else {
          $('.header_area').removeClass('stiky');
      }
  });
 //Menu click to show and hide
 
        $(".mobile_menu").click(function () {
            $(".navigation ul ").toggle(400);
        });

//if window size below 767 then style attribute will be gone

        jQuery(window).resize(function () {
            var screenwidth = jQuery(window).width();
            if (screenwidth > 767) {
                jQuery(".navigation ul ").removeAttr("style");

            }
        });