easyui-loading.js 666 B

1234567891011121314151617181920212223
  1. /*载入遮罩开启*/
  2. jQuery.fn.loading = function(msg) {
  3. if(msg==null||msg==''){
  4. msg="正在处理,请稍候。。。";
  5. }
  6. $("<div id=\"loading-mask\" class=\"datagrid-mask\"></div>").css({
  7. display : "block",
  8. width : "100%",
  9. height : $(window).height()
  10. }).appendTo(this);
  11. $("<div id=\"loading-mask-msg\" class=\"datagrid-mask-msg\"></div>").html(msg).appendTo(
  12. this).css({
  13. display : "block",
  14. left : ($(document.body).outerWidth(true) - 190) / 2,
  15. top : ($(window).height() - 45) / 2
  16. });
  17. }
  18. /*载入遮罩关闭*/
  19. jQuery.fn.loadend = function() {
  20. $(this).children('#loading-mask').remove();
  21. $(this).children('#loading-mask-msg').remove();
  22. }