javascript - jQuery Fade Out on Scroll not working -
i using fade out div on scroll not working, 600 offset of div. cant figure out why not working.
$(window).scroll(function(){ wscroll = $(this).scrolltop(); $('.hack').css({ 'transform' : 'translate(0px , ' + wscroll/2 +'%)', 'opactiy' : 1 - (wscroll/600) }); });
$(window).scroll(function () { var scrolltop = $(window).scrolltop(); var height = $(window).height(); $('.logo_container, .slogan').css({ 'opacity': ((height - scrolltop) / height) }); });
Comments
Post a Comment