jQuery(function($){ "use strict"; jQuery('.search-box button').click(function(){ jQuery(".search_outer").toggle(); }); jQuery('.search_inner input.search-field').on('keydown', function (e) { if (jQuery("this:focus") && (e.which === 9)) { e.preventDefault(); jQuery(this).blur(); jQuery('.search_inner button.search-submit').focus(); } }); jQuery('.search_inner .search-submit').on('keydown', function (e) { if (jQuery("this:focus") && (e.which === 9)) { e.preventDefault(); jQuery(this).blur(); jQuery('button.search_btn').focus(); } }); }); function adventure_travelling_menu_open() { jQuery(".sidenav").addClass('open'); } function adventure_travelling_menu_close() { jQuery(".sidenav").removeClass('open'); } jQuery(function($){ $(window).scroll(function() { if ($(this).scrollTop() >= 50) { $('#return-to-top').fadeIn(200); } else { $('#return-to-top').fadeOut(200); } }); $('#return-to-top').click(function() { $('body,html').animate({ scrollTop : 0 }, 500); }); }); function adventure_travelling_text_copyied() { /* Get the text field */ var copyText = document.getElementById("myInput"); /* Select the text field */ copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ /* Copy the text inside the text field */ document.execCommand("copy"); /* Alert the copied text */ alert("Copied the text: " + copyText.value); } jQuery(function($){ $(window).load(function() { $(".loader").delay(2000).fadeOut("slow"); }) }); jQuery(window).scroll(function() { var data_sticky = jQuery('.menubar').attr('data-sticky'); if (data_sticky == "true") { if (jQuery(this).scrollTop() > 1){ jQuery('.menubar').addClass("stick_head"); } else { jQuery('.menubar').removeClass("stick_head"); } } });