diff options
Diffstat (limited to 'theme/javascript/core/loading.js')
-rw-r--r-- | theme/javascript/core/loading.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/theme/javascript/core/loading.js b/theme/javascript/core/loading.js new file mode 100644 index 0000000..1ddb213 --- /dev/null +++ b/theme/javascript/core/loading.js @@ -0,0 +1,16 @@ +define([ + "jQuery" +], function($) { + var showLoading = function(p) { + $(".book").addClass("is-loading"); + p.always(function() { + $(".book").removeClass("is-loading"); + }); + + return p; + }; + + return { + show: showLoading + }; +});
\ No newline at end of file |