Initialised object
This commit is contained in:
parent
0a3cf31b37
commit
74b41d494d
1 changed files with 20 additions and 0 deletions
20
parallax.js
20
parallax.js
|
@ -1,3 +1,23 @@
|
|||
var Parallax = {
|
||||
initialise: function() {
|
||||
|
||||
},
|
||||
calculate: function() {
|
||||
|
||||
},
|
||||
events: function() {
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
function is_on_screen(elm) {
|
||||
|
||||
var vpH = $(window).height(), // Viewport Height
|
||||
st = $(window).scrollTop(), // Scroll Top
|
||||
y = $(elm).offset().top,
|
||||
elementHeight = $(elm).height();
|
||||
return ((y < (vpH + st)) && (y > (st - elementHeight)));
|
||||
}
|
||||
function init_parallax() {
|
||||
$('.parallax').each(function(){
|
||||
// Calculate Offset
|
||||
|
|
Reference in a new issue