Jump to content

Moving the HTML Footer block to Article block

Go to solution Solved by tuanphan,

Recommended Posts

Website: https://kevinwalton-portfolio-2023.squarespace.com/about

Password: 1

 

Hi guys, 

Can anyone help out with my problem I am solving? On my About Page, I have added a script called Luxy JS. This makes the web page scroll slower. The only problem, is that it doesn't show the footer. The reason for that is because the Footer HTML block is not located in the one I have Luxy JS synced to, which is called Article. 

What I need to do is move the HTML Footer into Article using some kind of JS. Can someone help? Below is a screenshot of what I am looking for

 

Here is the Luxy JS Code below, and is only located in the About page of the site above:


<script src="https://min30327.github.io/luxy.js/dist/js/luxy.js"></script>

<script>
$(document).ready(function() {
     luxy.init({
        wrapper: 'article',
        wrapperSpeed: 0.045,
       
    });
});
</script>

 

CleanShot 2023-10-12 at 10.01.00@2x.jpg

Link to comment

That worked perfectly. Thank you.

Do you think you can help disable it on mobile? So far this JS is not working


<!-- Disable mobile: WORKING ON -->
<script charset="utf-8">  
 var isMobile = /iPhone|iPad|Android/i.test(navigator.userAgent);
 if (!isMobile) {
      luxy.init({
        wrapper: 'article',

       
    });
 }
 </script>

 

Link to comment

Use this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
if ($(window).width() > 768) {
  $('footer.sections').appendTo('#page>article');
}
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

try this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
if ($(window).width() > 768) {
  luxy.init({
        wrapper: 'article',

       
    });
}
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.