cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

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.

            
              <h1>Modaal Window Examples using Modaal</h2>
<a href="#inline" data-modaal-type="inline" data-modaal-animation="fade" class="btn modaal">Inline example</a>

<a href="#full" class="btn fullscreen">Fullscreen Modaal</a>

<a href="https://codepen.io/SitePoint/pen/bdbe384ca9e84ef1cc4d6bd29bbe55ac.html" data-modaal-type="ajax" data-modaal-animation="fade" class="btn modaal">Modaal with Ajax'd content</a>

<a href="#callbacks" data-modaal-type="inline" data-modaal-animation="fade" class="btn callbacks">Modaal with callbacks</a>

<p class="b">Examples using <a href="http://www.humaan.com/modaal/">Modaal</a>.</p>

<div id="inline" style="display:none;">
    <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
</div>

<div id="full" style="display:none;">
  <h2>Fullscreen Modaal Content</h2>
  <p>Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, <a href="https://google.com" target="_blank">porttitor eu</a>, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc.</p>
  <p>Quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. <a href="http://humaan.com" target="_blank">Cras ultricies mi eu turpis</a> hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing.</p>
  <form action="/" class="demo-form">
    <p><label for="name">Input Label</label><br>
      <input name="name" id="name" autocomplete="on"></p>
    <p><input type="checkbox" name="fieldInput1" id="fieldInput1"><label for="fieldInput1">Label</label></p>
    <p><input type="checkbox" name="fieldInput2" id="fieldInput2"><label for="fieldInput2">Label 2</label></p>
    <p><input type="checkbox" name="fieldInput3" id="fieldInput3"><label for="fieldInput3">Label 3</label></p>
    <span style="display:none;"><button type="submit">Submit</button></span>
  </form>
  <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. <a href="https://www.nytimes.com/" target="_blank">Phasellus consectetuer vestibulum elit.</a> Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat augue.</p>
</div>

<div id="callbacks" style="display: none;">
  <p>Example with callbacks.</p>
</div>
            
          
!
            
              body {
  font-family: 'Lato', sans-serif;
  padding: 20px;
  text-align: center;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px;
  background: #444;
  color: white;
}

.btn:hover {
  background: #ccc;
  transition: all .3s;
  color: #555;
}

.b {
  margin-top: 100px;
}
            
          
!
            
              $('.inline').modaal();

$('.fullscreen').modaal({
  fullscreen: true
});

$('.callbacks').modaal({
  before_open: function() {
    alert('Before open');
  },
  after_close: myFunction
});

function myFunction() {
  alert('After close');
}
            
          
!
999px
Loading ..................

Console