Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Added UMD support #63

Merged
merged 3 commits into from
Mar 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions js/jquery.pickmeup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @copyright Copyright (c) 2008-2009, Stefan Petre
* @license MIT License, see license.txt
*/

(function (d) {
function getMaxDays () {
var tmpDate = new Date(this.toString()),
Expand Down Expand Up @@ -39,7 +40,19 @@
return Math.floor(time / 24*60*60*1000);
};
})(Date.prototype);
(function ($) {

(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// CommonJS
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var instances_count = 0;
$.pickmeup = $.extend($.pickmeup || {}, {
date : new Date,
Expand Down Expand Up @@ -1119,4 +1132,4 @@
}
});
};
})(jQuery);
}));
Loading