jQuery(function($){ "use strict"; jQuery('.gb_navigation > ul').superfish({ delay: 500, animation: {opacity:'show',height:'show'}, speed: 'fast' }); }); function beauty_cosmetic_shop_gb_Menu_open() { jQuery(".side_gb_nav").addClass('show'); } function beauty_cosmetic_shop_gb_Menu_close() { jQuery(".side_gb_nav").removeClass('show'); } jQuery('.gb_toggle').click(function () { beauty_cosmetic_shop_Keyboard_loop(jQuery('.side_gb_nav')); }); var beauty_cosmetic_shop_Keyboard_loop = function (elem) { var beauty_cosmetic_shop_tabbable = elem.find('select, input, textarea, button, a').filter(':visible'); var beauty_cosmetic_shop_firstTabbable = beauty_cosmetic_shop_tabbable.first(); var beauty_cosmetic_shop_lastTabbable = beauty_cosmetic_shop_tabbable.last(); beauty_cosmetic_shop_firstTabbable.focus(); beauty_cosmetic_shop_lastTabbable.on('keydown', function (e) { if ((e.which === 9 && !e.shiftKey)) { e.preventDefault(); beauty_cosmetic_shop_firstTabbable.focus(); } }); beauty_cosmetic_shop_firstTabbable.on('keydown', function (e) { if ((e.which === 9 && e.shiftKey)) { e.preventDefault(); beauty_cosmetic_shop_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; }); }); } )( jQuery );