1jQuery( function($){ 2 3 "use strict"; 4 5 /* open minicart on click */ 6 if (getbowtied_scripts_vars.option_minicart == 1 && getbowtied_scripts_vars.option_minicart_open == 1) { 7 8 $('body').on('click', '.shopping-bag-button .tools_button', function(e) { 9 10 if( $('body').hasClass('gbt_custom_notif') ) { 11 $('.gbt-custom-notification-notice').removeClass('open-notice').removeAttr( 'style' ).addClass('fade-out-notice'); 12 } 13 14 if ( $(window).width() >= 1024 ) { 15 16 e.preventDefault(); 17 $('.shopkeeper-mini-cart').toggleClass('open'); 18 e.stopPropagation(); 19 20 } else { 21 e.stopPropagation(); 22 } 23 }); 24 25 /* close minicart */ 26 $('body').on('click', function(event){ 27 if( $('.shopkeeper-mini-cart').hasClass('open') ) 28 { 29 if (!$(event.target).is('.shopkeeper-mini-cart') && !$(event.target).is('.shopping-bags-button .tools-button') && !$(event.target).is('.woocommerce-message') 30 && ( $('.shopkeeper-mini-cart').has(event.target).length === 0) ) 31 { 32 $('.shopkeeper-mini-cart').removeClass('open'); 33 } 34 } 35 }); 36 } 37 38 /* open minicart on hover */ 39 if ( $(window).width() >= 1024 ) { 40 if (getbowtied_scripts_vars.option_minicart == 1 && getbowtied_scripts_vars.option_minicart_open == 2) { 41 42 $('.shopping-bag-button').on({ 43 mouseenter: function(e) { 44 if( !($('.shopkeeper-mini-cart').hasClass('open')) ) { 45 window.setTimeout(function() { 46 47 if( $('body').hasClass('gbt_custom_notif') ) { 48 $('.gbt-custom-notification-notice').removeClass('open-notice').removeAttr( 'style' ).addClass('fade-out-notice'); 49 } 50 51 e.preventDefault(); 52 $('.shopkeeper-mini-cart').addClass('open'); 53 e.stopPropagation(); 54 55 }, 350); 56 } 57 }, 58 mouseleave: function() { 59 window.setTimeout(function() { 60 if ( $('.shopkeeper-mini-cart').hasClass('open') && !$('.shopkeeper-mini-cart').is(':hover') ) { 61 $('.shopkeeper-mini-cart').removeClass('open'); 62 } 63 }, 500); 64 } 65 }); 66 67 $('.shopkeeper-mini-cart').on({ 68 mouseleave: function (e) { 69 window.setTimeout(function() { 70 if ( ($('.shopkeeper-mini-cart').hasClass('open')) ) { 71 $('.shopkeeper-mini-cart').removeClass('open'); 72 } 73 }, 500); 74 } 75 }); 76 } 77 } 78 79});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.