javascript - On scroll, how to make a div in the background move up, while the div on top of it moves in the opposite direction? -
here website: http://kingston20x15.com/
what jquery should looking @ try , blocks in background move in opposite direction vertically blocks in front of text?
so far i've been trying hack fiddle unsuccessfully:
var winheight = $(window).innerheight(); $(document).ready(function () { $(".panel").height(winheight); $("body").height(winheight*$(".panel").length); }); $(window).on('scroll',function(){ $(".panelcon").css('bottom',$(window).scrolltop()*-1); });
Comments
Post a Comment