(function($) { "use strict"; /* ================================= === SCROLL TOP ==== =================================== */ jQuery(".ta_upscr").hide(); function taupr() { jQuery(window).on('scroll', function() { if ($(this).scrollTop() > 500) { $('.ta_upscr').fadeIn(); } else { $('.ta_upscr').fadeOut(); } }); $('a.ta_upscr').on('click', function() { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); } taupr(); })(jQuery);