0

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;
}
Rhami
  • 27
  • 1
  • 6

1 Answers1

0

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.

M. Foyer
  • 11
  • 1