Stellar Parallax Effect not Working

189 Views Asked by At

I'm trying to have a simple parallax effect on a background image using Stellar.js...what am I doing wrong?

My HTML:

...
<div id="parallax" data-stellar-background-ratio="2">
<p>Content</p>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script src="js/jquery.stellar.min.js"></script>

<script>
    $("#parallax").stellar();
</script>

</body>
</html>

CSS

#parallax {
    background-image: url("../img/bg.jpg");
    height: 500px;
}
1

There are 1 best solutions below

0
M. Foyer On

I'm a bit late, but anyway try to use the jquery that comes in the Stellar zip, and change your background attachment to fixed.