(Almost) Static Background
40 |This section has a background that moves slightly slower than the user scrolls. This is achieved by changing the top position of the background for every pixel the page is scrolled.
41 |├── .DS_Store ├── .gitignore ├── README.markdown ├── bower.json ├── images ├── dot.png ├── firstBG.jpg ├── secondBG.jpg ├── thirdBG.jpg └── trainers.png ├── index.html ├── scripts ├── jquery.localscroll-1.2.7-min.js ├── jquery.parallax-1.1.3.js └── jquery.scrollTo-1.4.2-min.js └── style.css /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | npm-debug.log 15 | node_modules 16 | components -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | jQuery Parallax 2 | =============== 3 | 4 | jQuery Parallax is a script that simulates the parallax effect as seen on [nikebetterworld.com](http://www.nikebetterworld.com/). 5 | 6 | Plugin: jQuery Parallax 7 | Version: 1.1.3 8 | Author: [Ian Lunn](http://www.ianlunn.co.uk/) 9 | Twitter: [@IanLunn](http://www.twitter.com/IanLunn) 10 | Demo: [jQuery Vertical Parallax Demo](http://www.ianlunn.co.uk/plugins/jquery-parallax/) 11 | Tutorial: [Nikebetterworld Parallax Effect Demo](http://www.ianlunn.co.uk/blog/code-tutorials/recreate-nikebetterworld-parallax/) 12 | 13 | Dual licensed under the MIT and GPL licenses: 14 | http://www.opensource.org/licenses/mit-license.php 15 | http://www.gnu.org/licenses/gpl.html 16 | 17 | Updates 18 | ------- 19 | 20 | 12/6/2012 - Fixed a few demo bugs and made easier to use 21 | - Fixed a bug that prevented the third section from working 22 | - Removed the need to use the adjuster value 23 | 24 | 8/5/2012 - Fixed height/outerHeight parameter 25 | - Smoother effect when scrolling 26 | - Fixed positioning with scaled backgrounds 27 | - Reduced code 28 | - Now passes jsl 0.3.0 without warnings 29 | 30 | 26/10/2011 - Updated to work with jQuery 1.6.4 31 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-parallax", 3 | "version": "1.1.3", 4 | "main": "scripts/jquery.parallax.js", 5 | "dependencies": { 6 | "jquery": "~1.8.3", 7 | "jquery.scrollTo": "~1.4.6", 8 | "jquery.serialScroll": "*" 9 | }, 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "components" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /images/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/images/dot.png -------------------------------------------------------------------------------- /images/firstBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/images/firstBG.jpg -------------------------------------------------------------------------------- /images/secondBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/images/secondBG.jpg -------------------------------------------------------------------------------- /images/thirdBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/images/thirdBG.jpg -------------------------------------------------------------------------------- /images/trainers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IanLunn/jQuery-Parallax/cf5643b735683a5d8a5cd4afe7a8b02404774b1a/images/trainers.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |This section has a background that moves slightly slower than the user scrolls. This is achieved by changing the top position of the background for every pixel the page is scrolled.
41 |The multiple backgrounds applied to this section are moved in a similar way to the first section -- every time the user scrolls down the page by a pixel, the positions of the backgrounds are changed.
50 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nibh erat, sagittis sit amet congue at, aliquam eu libero. Integer molestie, turpis vel ultrices facilisis, nisi mauris sollicitudin mauris, volutpat elementum enim urna eget odio. Donec egestas aliquet facilisis. Nunc eu nunc eget neque ornare fringilla. Nam vel sodales lectus. Nulla in pellentesque eros. Donec ultricies, enim vitae varius cursus, risus mauris iaculis neque, euismod sollicitudin metus erat vitae sapien. Sed pulvinar.
51 |The user gets a slap! Actually, all that jQuery does is moves the backgrounds relative to the position of the scrollbar. Without it, the backgrounds simply stay put and the user would never know they are missing out on the awesome! CSS2 does a good enough job to still make the effect look cool.
61 |Check out my new plugin Sequence.js for parallax effects and a whole lot more!
68 | 69 |This demo is based on the Nikebetterworld.com website.
77 | 78 |This plugin makes use of some scripts and images made by others:
80 |