Sunday, 15 September 2013

jQuery - Parallax Scrolling

jQuery - Parallax Scrolling

I want a parallax scrolling effect on my site but I can't get it to work..
Like: http://abduzeedo.com/
This is what I've got and I've already searched the web and found
tutorials but without any success: http://jsfiddle.net/4WsCZ/
$("#container").scroll(function () {
var s = $("#container").scrollTop();
$("#container #page-head").css("-webkit-transform","translateY(" +
(s/2) + "px)");
}
Thanks!

No comments:

Post a Comment