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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.

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.


                <h2>Bootstrap 3 Modals Timed Alert Demo</h2>

<!-- Link triggered modal -->
<p><a href="#" 
      data-target="#timedAlert">Click to open a timed alert</a></p>
<!-- Button triggered modal -->
<p><button type="button" 
        class="btn btn-primary btn" 
  Click to open a timed alert

<div id="timedAlert" tabindex="-1" class="modal fade" role="dialog" aria-labelledby="timedAlert" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <div><div class="loadersmall"></div>We control the vertical and the horizontal. Please stand by for <span>&nbsp;</span>...</div>

<hr size="2" />
<p>If you find this demo useful, please consider <a href="" target="_blank">donating $1 dollar</a> (secure PayPal link) for a coffee or purchasing one of my songs from <a href="" target="_blank"></a> or <a href="" target="_blank"></a> for only 0.99 cents each. </p>
<p>Rob uses and recommends <a href="" target="_blank">MochaHost</a>, which provides Web Hosting for as low as $1.95 per month, as well as unlimited emails and disk space!</p>



                body { text-align: center; }

#timedAlert .modal-dialog  { 
  width: 470px; 
  text-align: center;

.loadersmall {
    float: left;
    margin-right: 5px;
    border: 5px solid #f3f3f3;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    border-top: 5px solid #555;
    border-radius: 50%;
    width: 20px;
    height: 20px;

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }


                var DISPLAY_TIME = 5;
  .on('', function() {
    $(this).find('.modal-body span').text(DISPLAY_TIME);
}).on('', function () {  
    var countdownTimer = setInterval(function(timedAlert){
      var spanElt  = timedAlert.find('.modal-body span'),
          timeLeft = parseInt(spanElt.text());
      $('.modal-body span').text(--timeLeft);
      if (timeLeft <= 0) timedAlert.modal('hide');
    },1000, $(this));
    $(this).data('countdownTimer', countdownTimer);
}).on('', function() {