Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onresize = readjustTheForm;
- var current = 'desktop';
- function readjustTheForm()
- {
- //mobile - #xr_xd65
- //desktop - #xr_xrc9 > .xr_noreset
- if(window.width < 720 && current === 'desktop')
- {
- document.getElementById('xr_xd65').appendChild( document.getElementById('JotFormIframe') );
- current = 'mobile';
- }
- else if(window.width > 719 && current === 'mobile')
- {
- document.getElementById('xr_xrc9').getElementsByClassName('xr_noreset').appendChild( document.getElementById('JotFormIframe') );
- current = 'desktop';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement