Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
  <head>
    <title>VideoAsk Modal</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <script src="https://www.videoask.it/embed/embed.js"></script>

    <style>
      html,
      body {
        margin: 0;
        padding: 0;
        height: 100%;
      }

      body {
        text-align: center;
      }

      .custom-button {
        background: blue;
        padding: 24px 32px;
        font-size: 16px;
        border: none;
        color: white;
        margin: auto;
        display: block;
        border-radius: 8px;
      }
    </style>
  </head>
  <body>
    <br /><br />

    <button
      class="custom-button"
      onclick="videoask.loadModal('https://www.videoask.com/fn5pz0q1v')"
    >
      Click this button to show the default modal
    </button>

    <br /><br />

    <button
      class="custom-button"
      onclick="videoask.loadModal({url: 'https://www.videoask.com/fn5pz0q1v', options: { modalType: 'Fullscreen'}})"
    >
      Click this button to show the fullscreen modal
    </button>

    <br /><br />

    <a
      href="javascript:void(videoask.loadModal('https://www.videoask.com/fn5pz0q1v'))"
    >
      Click this link to show the default modal
    </a>

    <br /><br />

    <a
      href="javascript:void(videoask.loadModal({url: 'https://www.videoask.com/fn5pz0q1v', options: { modalType: 'Fullscreen'}}))"
    >
      Click this link to show the fullscreen modal
    </a>

    <br /><br />
    <br /><br />
    <br /><br />

    

    <!-- This script runs when the page loads and loads the modal when the hash is #videoask -->
    <script>
      document.addEventListener("DOMContentLoaded", function() {
        if (window.location.hash.startsWith("#videoask")) {
          let url = "https://www.videoask.com/qus3u5g68?hb";

          const search = window.location.hash.replace("#videoask", "");
          if (search) {
            if (search.indexOf("?") !== -1) {
              url = "https://www.videoask.com" + search + "&hb";
            } else {
              url = "https://www.videoask.com" + search + "?hb";
            }
          }
          videoask.loadModal({
            url: url,
            options: { modalType: "Fullscreen" }
          });
        }
      });
    </script>
    
  </body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console