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.


                <div data-callback="fn" countdown="5"></div>
<div data-callback="fi" countdown="10"></div>
<blockquote id="content">
  Press F12 for console debug 
  1. jQuery
  2. Bootstrap 4 css
  attribute info:
    countdown = to start countdown
    data-callback = function name of callback
    data-warning = bar warning style 
    data-success = bar success style
    data-base = bar progress style



  margin: 0 0 0 0;
  padding: 0 0 0 0;


var elm = $('[countdown]');
if (elm.length > 0){
function fc() {
  console.log('callback Succedeed');
function ctd(elm){
  var tl = (elm.attr('countdown') > 0 ? elm.attr('countdown') : 5), bs = ('base') ?'base') : 'bg-info'), bw = ('warning') ?'warning') : 'bg-danger'), bc = ('success') ?'success') : 'bg-success'),
  myCountdown = elm.progressBarTimer({

    // warning threshold in seconds
    warningThreshold: 5,
    timeLimit: tl,

    // base style
    baseStyle: bs,

    // warning style
    warningStyle: bw,

    // complete style
    completeStyle: bc,

    // should the timer be smooth or stepping
    smooth: true,

    // striped progress bar
    striped: true,

    // animated stripes
    animated: true,

    // height of progress bar
    // 0 = default height
    height: 0,
    onFinish: function () {
      var callback ="callback");
      var xn = window[callback];

      if (typeof xn == 'function') {
        var x = eval(callback);
      } else {
        console.log(callback + ' isn\'t function ');
    label: {
      show: true,
      type: 'percent' // or 'seconds' => 23/60
    autoStart: true