holly-packages
Version:
Packages for Holly app.
26 lines (22 loc) • 515 B
JavaScript
/**
* 为 AdminLTE 里的 .box 添加 .overlay spinner
*/
(function($) {
"use strict";
/**
* Usage:
* show: $(...).boxspin()
* hide: $(...).boxspin(false)
*/
$.fn.boxspin = function(show) {
if (!this.length) {
return this;
}
if (false === show) {
$(this).closest('.box').find('.overlay').remove();
} else {
$(this).closest('.box').append('<div class="overlay"><i class="fa fa-refresh fa-spin fa-lg fa-fw"></i></div>');
}
return this;
}
})(jQuery);