Advertisement
cqmikko

Lightbox_Mobile_Responsive

Jan 25th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta name=viewport content="width=device-width, initial-scale=1">
  6. </head>
  7. <body>
  8.  
  9.  
  10.  
  11. <div style="width: 300;">
  12. <script src="https://form.jotform.com/static/feedback2.js?3.3.REV" type="text/javascript">
  13.  
  14. // get current width of the window
  15. var parentWidth = window.innerWidth;
  16. var parentHeight;
  17.  
  18. // check if the window size is less than 499, assuming that it means it is viewed on a mobile device
  19. if(window.innerWidth <= 499) {
  20. parentWidth = window.innerWidth; // if it's in mobile view assign the current width to this variable
  21. parentHeight = window.innerHeight - (window.innerHeight * 0.1);
  22. } else {
  23. parentWidth = 700; // if it's viewed on a window larger thatn 499px then set the width to 500px
  24. parentHeight = 500;
  25. }
  26.  
  27.  
  28.  
  29. var JFL_60244871950962 = new JotformFeedback({
  30. formId: '60244871950962',
  31. base: 'https://form.jotform.com/',
  32. windowTitle: 'Lightbox Embed Code - Mobile Responsive',
  33. background: '#FFA500',
  34. fontColor: '#FFFFFF',
  35. type: 'false',
  36. height: parentHeight,
  37. width: parentWidth,
  38. openOnLoad: false
  39. });
  40. </script>
  41. <a class="btn lightbox-60244871950962" style="margin-top: 16px">
  42. Lightbox Embed Code - Mobile Responsive
  43. </a>
  44.  
  45. </div>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement