Custom Js not working on 600px breakpoint
-
Hi there,
I’m hoping someone can help me out. I’ve been stuck on this for a couple of days now.
I’m using two custom JS elements on a website that work perfectly on desktop, but on mobile (at the 600px breakpoint), they disappear completely. I’ve tested different browsers and devices, disabled AJAX, and turned on Compatibility Mode, but no luck so far.
You can check them out here:
– The CanvasAnimation (ScrollTrigger) on: https://stagging.ralphbruens.nl/technology
– The Leaflet map on: https://stagging.ralphbruens.nl/contactWould really appreciate any pointers or ideas. Thanks in advance!
-
ok and whats the js code u use to make this work?
ure using custom phone grid on both these pages.
please note with custom phone grid, your markup will be duplicated.
one markup for desktop, one for phone.so you need to make sure to initialize your JS for both of these canvases on the page
sidenote: u can disable any lay theme plugins you dont use. cause each lay addon loads its own js file and css file. and u may not need them all
-
ok and whats the js code u use to make this work?
ure using custom phone grid on both these pages.
please note with custom phone grid, your markup will be duplicated.
one markup for desktop, one for phone.so you need to make sure to initialize your JS for both of these canvases on the page
sidenote: u can disable any lay theme plugins you dont use. cause each lay addon loads its own js file and css file. and u may not need them all
@arminunruh Thanks for pointing me in the right direction. I did some tweaks to my code, and it's working for now.
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it