Sha256: 2d2ec0788b1d77987553c0f3bdf0adc10740ffd60e3a8812803e00c48d1d3338

Contents?: true

Size: 461 Bytes

Versions: 40

Compression:

Stored size: 461 Bytes

Contents

var Countdown = require('./countdown.js');
var NAME = 'countdown';
var DATA_ATTR = 'date';

jQuery.fn.countdown = function(options) {
  return $.each(this, function(i, el) {
    var $el = $(el);
    if (!$el.data(NAME)) {
      // allow setting the date via the data-date attribute
      if ($el.data(DATA_ATTR)) {
        options.date = $el.data(DATA_ATTR);
      }
      $el.data(NAME, new Countdown(el, options));
    }
  });
};

module.exports = Countdown;

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
wbase-0.3.20 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.19 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.18 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.17 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.16 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.15 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.14 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.13 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.12 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.11 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.10 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.9 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.8 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.7 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.6 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.5 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.4 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.3 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.2 lib/vendor/admin/countdown/src/jquery-wrapper.js
wbase-0.3.1 lib/vendor/admin/countdown/src/jquery-wrapper.js