Parallax scrolling in jQuery
Wynn Netherland wrote a plugin for jQuery that makes it easy to add a slick Parallax effect to a web site. For anyone who missed video games of the 80s, this is the old sidescroller technique that simulates depth by making things in the foreground move faster than the background. The jQuery Parallax plugin does this by easing the background position across several div layers, all at different rates.
To make it work, you just make a horizontally tile-able background image, and a horizontally tile-able alpha-transparent PNG for each foreground layer. These are each set as the background image of a separate div with the repeat-x attribute. The divs are absolutely positioned right on top of each other, and then a single line of jQuery code is used to set the animation speed for each layer.
It's a subtle and bandwidth friendly way to add a bit of visual polish to your site. Netherland is using this effect for his blog's masthead, and it looks pretty cool.
jQuery Parallax Scrolling (download)
jQuery
jQuery Easing library - you'll need this too
Posted by Jason Striegel |
Jun 22, 2008 06:10 PM
Ajax, Web |
Permalink
| Comments (0)
Recent Entries
- Objective-J and Cappuccino: Cocoa for the web
- JSVI - Javascript Vi for web forms
- Arduino VGA demo
- Flight instruments for an RC plane
- Image Fulgurator - subverting other people's photos
- Videos from past Shmoocons
- Algorithm Geeks
- How we made Google Apps Hacks
- Parallax scrolling in jQuery
- Twilight Hack for Wii v3.3
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Design
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Objective-J and Cappuccino: Cocoa for the web
- JSVI - Javascript Vi for web forms
- Arduino VGA demo
- Flight instruments for an RC plane
- Image Fulgurator - subverting other people's photos
- Videos from past Shmoocons
- Algorithm Geeks
- How we made Google Apps Hacks
- Parallax scrolling in jQuery
- Twilight Hack for Wii v3.3
www.flickr.com
|





Leave a comment