Additional code on Desktop layout only?
-
Hello there,
I'm adding some additional Javascript to a page on my site, using the dropdown in the editor:

The code runs something that is only really worthwhile on desktop, and works fine, but I don't want it to run on mobile. So, I created the custom mobile layout, clicking on the phone icon and choosing "start with empty layout" and created a new design, but the code still runs there on mobile.
Is there a way to add code this way and have it only work on the desktop version of the same page?
Thanks!!
-
Dear @R-Seance
It could be that you are loading the page in Desktop view and therefore the JS into the browser and reducing the browser size to mobile layout but then the JS is still present?, unsure sorry.
Would you be able to post your custom HTML/JS and then i can have a better idea and run some tests for you!!! :)
Interesting question and worth investigating @R-Seance
Talk soon & best wishes
Richard -
Dear @R-Seance
Of course ๐sorry that chats isnt working for you!
Talk soon & have a wonderful day
Richard
-
Dear @R-Seance
Of course ๐sorry that chats isnt working for you!
Talk soon & have a wonderful day
Richard