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