Advertisement
fahimmurshed

UAEL nav menu close on clicking outside

May 27th, 2022
653
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function($){
  2.     $( document ).on('mouseup', function (event) {
  3.         var $trigger = $('.uael-nav-menu__toggle');
  4.         if( $trigger != event.target && !$trigger.has(event.target).length ){
  5.             $('.uael-nav-menu__toggle.uael-active-menu').trigger( "click" );
  6.         }
  7.     });
  8. })(jQuery);
Advertisement
RAW Paste Data Copied
Advertisement