Reputation: 6655
I am creating a page with some parallex bg effect.. i have three divs with same background see this fiddle
when i use different bg images for all the divs then the parallex is working but with same bg images to all the divs, its not working.
I am using this parallax jQuery plugin http://ianlunn.co.uk/plugins/jquery-parallax/
Jquery code
$(document).ready(function(){
$('.sep').parallax("50%", 0.6);
});
Upvotes: 1
Views: 6636
Reputation: 78630
It seems you need to call parallax
on each element individually. You can do so with each
:
$('.sep').each(function(){
$(this).parallax("50%", 0.6);
});
Upvotes: 2
Reputation: 8954
Add a unique class onto each one.
$(document).ready(function(){
$('.sep1').parallax("50%", 0.6);
$('.sep2').parallax("50%", 0.6);
$('.sep3').parallax("50%", 0.6);
});
Upvotes: 1