Skip to content

Instantly share code, notes, and snippets.

@hrumhrumble
hrumhrumble / gist:9949751
Last active August 29, 2015 13:58 — forked from ig-l/gist:9949739
$(window).scroll(function(e){
parallax();
});
function parallax() {
var scrolled = $(window).scrollTop();
var list_1 = parseInt($('.list_left1').css('top'));
$('#bg').css('top', -(scrolled * 0.2) + 'px');
$('.list_left1').css('top', list_1 + (scrolled * 0.3) + 'px');