Jquery Parallax Scrolling effect - Multi directional
Solution 1
I threw something together is jsfiddle for you.
The script initializes the start positions of all of the objects first. Then handlers are set up for arrow key and mouse wheel. After that is the meat of the algorithm in the parallaxScroll function.
It uses the ARROWS or MOUSEWHEEL for scrolling.
There are from [left, right, top, bottom] transitions.
The HTML and CSS are really simple.
The JS/jQuery that runs it is self explanatory.
It's an interesting effect, that seems to be geared for artsy type sites.
Solution 2
Did you look into librairies like Scrollrama http://johnpolacek.github.com/scrollorama/ or Curtain http://curtain.victorcoulon.fr/?
I know in your question you mention that you already looked into different librairies but depending how they work it's difficult to really suggest how to use proper coordinates.
*edit1
If you didn't see it yet, the auther of scrollorama also did superscrollorama which give a bit more controler over the animation for example animation when an element is pinned.
http://johnpolacek.github.com/superscrollorama/
Solution 3
This article in smashinghub.com shows a collection of JQuery plugin for scrolling and parallax effect I'm totally sure one of them will help you. it looks like jQuery Scroll Path is the most advanced of them or suit your requirements.
Solution 4
I realize I'm jumping in late here, and this might seem ultra obvious, but have you tried reverse engineering what they have done on https://victoriabeckham.landrover.com/INT? It looks like the ScrollAnimator script does a bulk of the work. I would download their site & mess with it locally, subtracting parts until I figured out which components provide which pieces of functionality. Then I would read through those to understand how they made it happen.
Related videos on Youtube
Dancer
Digital Designer/ Front-end Developer / App Developer from Liverpool UK. Currently working for Liquid Agency www.liquidagency.co.uk
Updated on July 09, 2022Comments
-
Dancer almost 2 years
I need to build a multi-directional JQuery parallax page for a client - they basically want it to work in a similar way to this - https://victoriabeckham.landrover.com/INT
I have the artwork ready and have found many jquery libraries that will allow me to scroll horiz/vertical - but i'm not sure how to combine both together at a specific co-ordinate. Could anyone please point me in a the right direction?
Edit: I did originally sign this post off having looked into Superscrolarama and thinking all was solved - but having struggled with implementing it - I dont think its quite the saviour I thought it was, I need both horizontal and vertical parallax as well as scrolling to achieve above, which it doesn't seem to support - so any other tips I'd be very grateful for!
-
Blazemonger over 11 years"Hey, I've got an idea: let's take one of the most basic user-computer interactions that's been around since the early 1980s, and break it completely! If it's shiny enough nobody will mind!" -- Sorry, but there's something fundamentally wrong with changing vertical scrolling into horizontal scrolling halfway through the page.
-
Orbling over 11 yearsEssentially just doing both at once when you arrive at the right place.
-
Dancer over 11 yearscheers guys, I've just gotta do what the client wants! But this is a pain in the ass to figure out - any thoughts/suggestions on how to achieve would be most welcome!
-
Asciiom over 11 yearsBasically, it DOESN'T scroll horizontally, it fakes this by mapping the scroll value to the element's horizontal positioning.
-
rexmac over 11 yearsThe (alleged) author of that site talks a bit about how it works here.
-
DBUK over 11 yearsThis question really interests me. I have been thinking about the same thing and all I can find is hori or vert...but never together in the same site. The closest I could find was: blog.fraser-hart.co.uk/jquery-sprite-animation/#.UE3GGHmoxvk
-
Dancer over 11 yearscheck out scrollorama - its a bit confusing to setup - but works a treat..johnpolacek.github.com/scrollorama
-
Joram van den Boezem over 11 yearsNot an answer but worth checking out while at unorthodox scrolling effects: 360langstrasse.sf.tv
-
Louis Ricci over 11 years@DBUK - if you're interested in the algorithm behind the effect. I implemented it (with the four directions) in a jsfiddle. (check my answer)
-
-
Dancer over 11 yearsScrollorama is great and will do the job I think, bit confusing to get my head around as the documentation is pretty sparse - but looks like it will do the trick with som effort..
-
Dancer over 11 yearsspoke too soon! doesnt support multi direction parallax
-
NicMagnier over 11 yearsDo you mean the user will be able to scroll vertically and horizontally navigate the content?
-
Dancer over 11 yearsno they need to scroll in the one direction (down) and at a certain point the parallax needs to go right to left despite the fact they are still scrolling down.. they want something almost exactly the same as victoriabeckham.landrover.com/INT
-
NicMagnier over 11 yearsI still didn't had time to have a close look at scrollorama but I thought it was possible to move elements left and right. I did a quick test here: mx981.com/stuff/scrollrama/test.html
-
Dancer over 11 yearsCheers Nic, I'd need to use Superscrollorama though as i'd need the combined pinning/ parallax effects - I cant for the life of me get the script above to work in a pinned superscrollorama syntax - if you could explain that the +100 bounty is yours!
-
NicMagnier over 11 yearsI'd love to help but this week will be tough. If I find some time I'll try to tinker with it.
-
Louis Ricci over 11 years@DBUK - For simple effects like this I prefer rolling my own code. Plugins have there place, but we're talking ~150 lines of JavaScript. IMHO you can learn more from my thrown together example than you can from an all encompassing jQuery plugin like Scrollrama.
-
DBUK over 11 yearsSadly I am not up to rolling my own code yet, soon hopefully, but from looking at your js I have a better grasp/understanding of it than I do with scrollrama etc, thanks again :)
-
Raja almost 11 yearsThanks for the great script. If i want to control the scroll speed, then where should i change on the script?. Suggest Please.
-
Louis Ricci almost 11 years@Yadheendran - The calls to "parallaxScroll(NUM_OF_PIXELS_TO_SCROLL)" take a parameter, if you increase the magnitude of the parameter it will scroll faster. You could also decrease the interval time on the "window.setInterval".