Jump to content

CSS Animations Not Visible on Mobile

Recommended Posts

Site URL: http://www.ballybrookfarm.com/home

Thanks in advance for any help! 

I've loaded an css animation library to my site, added the correct codes as instructed, and the animations work fine on desktop version. However, when I view on a mobile device, each animation is hidden. I've searched for an answer and am not coming up with any solution. 

Here is the website link: www.ballybrookfarm.com/home

Here is the code I am using in the code block:

<div id="#block-yui_3_17_2_6_1459644649106_53673" class="slideUp">
 <script> 
 $(window).scroll(function () {
 $('#block-yui_3_17_2_6_1459644649106_53673').each(function () {
 var topOfWindow = $(window).scrollTop(),
 bottomOfWindow = topOfWindow + $(window).height();
 
 var imagePos = $(this).offset().top;
 
 if(imagePos <= bottomOfWindow-250 && imagePos >= topOfWindow+250){
 $(this).addClass('slideUp');
 }
 //else{
 //$(this).removeClass('slideUp');
 //}
 });
 });
 </script>

 

And this is the code I am adding to the Custom CSS section:

#block-yui_3_17_2_6_1459644649106_53673{
background-color: #ffffff;
visibility: hidden;
}

 

Hoping to have the exact same animations seen on desktop on a mobile device.

Thank you!

Link to comment
  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.