jQuery(function($){ "use strict"; jQuery('.gb_navigation > ul').superfish({ delay: 500, animation: {opacity:'show',height:'show'}, speed: 'fast' }); }); function bookstore_exhibition_gb_Menu_open() { jQuery(".side_gb_nav").addClass('show'); } function bookstore_exhibition_gb_Menu_close() { console.log('asdsad') jQuery(".side_gb_nav").removeClass('show'); } jQuery('.gb_toggle').click(function () { bookstore_exhibition_Keyboard_loop(jQuery('.side_gb_nav')); }); var bookstore_exhibition_Keyboard_loop = function (elem) { var bookstore_exhibition_tabbable = elem.find('select, input, textarea, button, a').filter(':visible'); var bookstore_exhibition_firstTabbable = bookstore_exhibition_tabbable.first(); var bookstore_exhibition_lastTabbable = bookstore_exhibition_tabbable.last(); bookstore_exhibition_firstTabbable.focus(); bookstore_exhibition_lastTabbable.on('keydown', function (e) { if ((e.which === 9 && !e.shiftKey)) { e.preventDefault(); bookstore_exhibition_firstTabbable.focus(); } }); bookstore_exhibition_firstTabbable.on('keydown', function (e) { if ((e.which === 9 && e.shiftKey)) { e.preventDefault(); bookstore_exhibition_lastTabbable.focus(); } }); elem.on('keyup', function (e) { if (e.keyCode === 27) { elem.hide(); }; }); }; ( function( $ ) { jQuery(document).ready(function($){ // Implement go to top. var $scroll_obj = jQuery( '#btn-scrollup' ); jQuery( window ).on( 'scroll',function(){ if ( $( this ).scrollTop() > 100 ) { $scroll_obj.fadeIn(); } else { $scroll_obj.fadeOut(); } }); $scroll_obj.on( 'click',function(){ jQuery( 'html, body' ).animate( { scrollTop: 0 }, 600 ); return false; }); $(document).ready(function(){ $(".product-cat").hide(); $("button.product-btn").click(function(){ $(".product-cat").toggle(); }); }); }); } )( jQuery );