Scroll down

jInvertScroll - A lightweight jQuery horizontal Parallax Plugin

What is it?
It's a lightweight plugin for jQuery that allows you to move in horizontal with a parallax effect while scrolling down.
It's extremely easy to setup and requires nearly no configuration.

By using this plugin, we expect that you know the limitations of horizontal parallax scrolling, for instance if the screen height is smaller than the content, the content will be clipped, but this plugin is intended anyway for webdesigners and -developers, so we think that you know what you're doing. ;-)


1.) Include the css file, jQuery and the Plugin
2.) Create the desired elements that you want to scroll (You can create normal divs, that contain other elements, images, videos...)
3.) Assign following attributes to the elements you just created:

position: fixed;	// All scrollable elements have to be position:fixed
bottom: 0;	// Make it stick to the bottom (or top)
width: xxxxpx;	// I recommend to assign the width in px, prevents preloading issues

4.) Order the layers via z-index (Note that it is recommended that the front layers are wider than the ones in the back) 5.) In your javascript, use this code (the selectors refer to the elements that you desire to be scrolled):
$.jInvertScroll(['yourselector1', 'yourselector2'...]);


You can tweak some options if you like:

$.jInvertScroll(['.myScrollableElements'], {
	width: 'auto',	// Page width (auto or int value)
	height: 'auto',	// Page height (the shorter, the faster the scroll)
	onScroll: function(percent) {
		// Callback function that will be called each time the user
		// scrolls up or down, useful for animating other parts
		// on the page depending on how far the user has scrolled down
		// values go from 0.0 to 1.0 (with 4 decimals precision)


You can download the script as a zip file here:

..or get it from our GitHub repository.


It is published under the Mit license.


The plugin was written by Alex Franzelin and sponsored by Pixxelfactory.