Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiangbing committed Jul 24, 2017
1 parent c495c17 commit b4cc9a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/loading.js
Expand Up @@ -12,9 +12,9 @@
(function (root, factory) {
//amd
if (typeof define === 'function' && define.amd) {
define(['$'], factory);
define(['jquery'], factory);
} else if (typeof exports === 'object') { //umd
module.exports = factory();
module.exports = factory($);
} else {
root.Loading = factory(window.Zepto || window.jQuery || $);
}
Expand All @@ -23,7 +23,6 @@
Loading.prototype = {
loadingTpl: '<div class="ui-loading"><div class="ui-loading-mask"></div><i></i></div>',
stop: function () {
var content = $(this.target);
this.loading.remove();
this.loading = null;
},
Expand Down Expand Up @@ -90,7 +89,7 @@
_this.stop();
});
$(window).on('resize', function () {
_this.setPosition();
_this.loading && _this.setPosition();
});
}
}
Expand Down

0 comments on commit b4cc9a3

Please sign in to comment.