Jump to content

Parallax on 7.1

Recommended Posts

Site URL: https://roncosta.com

Does anyone have any good css/javascript code to get the parallax effect on 7.1? The one I'm using used to work great but now the main header of pages are flickering when you're scrolling up/down using a web browser.

This is the code injection I'm using right now:

 

<script src="\[https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\](https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js)"></script>

<script src="\[https://cdn.jsdelivr.net/npm/scrollax@1.0.0/scrollax.min.js\](https://cdn.jsdelivr.net/npm/scrollax@1.0.0/scrollax.min.js)"></script>

<script> $('.has-background').attr('data-scrollax-parent', 'true'); $('.has-background .section-background').attr('data-scrollax', 'properties: { translateY: "30%" }'); $.Scrollax(); </script>

<style> .has-background {overflow: hidden;} </style>

Link to comment
  • 2 weeks later...
  • Replies 1
  • Views 422
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.