Marketo Free Form LP with split JS for Mobile and Desktop | Community
Skip to main content
Jay_sandbox_Sin
New Participant
December 18, 2020
Solved

Marketo Free Form LP with split JS for Mobile and Desktop

  • December 18, 2020
  • 1 reply
  • 1372 views

Our web designer tried to split the same JS code but it is supporting either desktop or mobile.

The JS code function is to enable visibility based on the fill out form i.e. confirm button id .

is there any alternate way so that it can split same JS code for mobile and desktop layer in Marketo free form LP design? 

<script> MktoForms2.whenReady(function (form){ form.onSuccess(function(values, followUpUrl){ form.getFormElem().hide(); document.getElementById('confirmform').style.visibility = 'visible'; return false; }); }); </script>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Simply showing/hiding a JS script block doesn't mean it doesn't execute: CSS-level visibility is irrelevant.

 

Instead, change the JS behavior by using the same breakpoints (i.e. media query) that the CSS does.

 

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
December 18, 2020

Simply showing/hiding a JS script block doesn't mean it doesn't execute: CSS-level visibility is irrelevant.

 

Instead, change the JS behavior by using the same breakpoints (i.e. media query) that the CSS does.