DEPRECATED: use @abernier/parallax
instead
Hardware-accelerated parallax
Demo: /abernier/0837661e346360b5385b/example/
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<script src="https://cdn.rawgit.com/abernier/3225993/raw/7f928620dbe65570950ab551ee06b82e480507bb/loop.js"></script>
<script src="parallax.js"></script>
npm install https://gist.github.com/abernier/0837661e346360b5385b/archive/847d8c07b85c0532d7a3931f90d522587cd50b85.tar.gz
$('#my').parallax({amplitude: .5});
or
var el = document.getElementById('my');
var parallax = new Parallax(el, {
amplitude: .5 // default: 1
});
parallax.loop.start();
Modified http://code.jquery.com/jquery-1.11.1.js to a secure url
Modified http://underscorejs.org/underscore.js to a secure url
Updated missing url https://rawgit.com/abernier/3225993/raw/7f928620dbe65570950ab551ee06b82e480507bb/loop.js to https://cdn.jsdelivr.net/gh/abernier/3225993/raw/7f928620dbe65570950ab551ee06b82e480507bb/loop.js
https://code.jquery.com/jquery-1.11.1.js
https://underscorejs.org/underscore.js
https://rawgit.com/abernier/3225993/raw/7f928620dbe65570950ab551ee06b82e480507bb/loop.js