地铁二期项目正式开始

loading.js 772B

123456789101112131415161718192021222324
  1. $(function () {
  2. $.ajaxLoading = function (options) {
  3. var img = $("#progressImgage");
  4. var mask = $("#maskOfProgressImage");
  5. var complete = options.complete;
  6. options.complete = function (httpRequest, status) {
  7. img.hide();
  8. mask.hide();
  9. if (complete) {
  10. complete(httpRequest, status);
  11. }
  12. };
  13. options.async = true;
  14. img.show().css({
  15. "position": "fixed",
  16. "top": "50%",
  17. "left": "50%",
  18. "margin-top": function () { return -1 * img.height() / 2; },
  19. "margin-left": function () { return -1 * img.width() / 2; }
  20. });
  21. mask.show().css("opacity", "0.1");
  22. $.ajax(options);
  23. };
  24. });