Skip to content

Commit

Permalink
amd wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
sjwilliams committed Feb 25, 2014
1 parent fcc0d38 commit aa9070d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"predef": [
"module",
"require",
"window"
"window",
"define"
]
}
13 changes: 10 additions & 3 deletions jquery.laziestloader.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/*! LaziestLoader - v0.0.1 - 2014-02-23
/*! LaziestLoader - v0.0.2 - 2014-02-25
* A responsive-aware jQuery plugin to smartly lazy load images and other elements.
* https://github.com/sjwilliams/laziestloader
* Thanks to Luís Almeida for 'unveil,' on which this project is based.
* Copyright (c) 2014 Josh Williams; Licensed MIT
*/
(function($) {

(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(window.jQuery);
}
}(function($) {

var laziestLoader = function(options, callback) {

Expand Down Expand Up @@ -200,4 +207,4 @@

$.fn.laziestloader = laziestLoader;

})(window.jQuery || window.Zepto);
}));

0 comments on commit aa9070d

Please sign in to comment.