jQuery(document).ready (function($){ setTimeout(function(){ jQuery('body').addClass('loaded'); }, 2000); $(".search-icon").click(function(){ $(".nav-wrap").toggle(500); $(".search-main").toggle(500); $(".search-icon .fa-times").toggle(); $(".search-icon .fa-search").toggle(); }); $(".mobile-nav-ico").click(function(){ $(".mobile-nav-wrap").toggle(500); }); var height_all = (jQuery(window).height()-jQuery("#header").height()); if(height_all>300){ jQuery("#ct_slider .carousel-inner .item").css("height",height_all); } var logo_image_width = jQuery(".logo-image").width(); jQuery(".logo-image").css("height",logo_image_width*2/3); //return top function gotoTop(min_height){ $("#gotoTop").click( function(){$('html,body').animate({scrollTop:0},700); }).hover( function(){$(this).addClass("hover");}, function(){$(this).removeClass("hover"); }); min_height ? min_height = min_height : min_height = 600; $(window).scroll(function(){ var s = $(window).scrollTop(); if( s > min_height){ $("#gotoTop").fadeIn(100); }else{ $("#gotoTop").fadeOut(200); }; }); }; gotoTop(); });