|
@@ -10,17 +10,14 @@ var $page = $('.yoho-page'); |
|
@@ -10,17 +10,14 @@ var $page = $('.yoho-page'); |
10
|
|
10
|
|
11
|
var $loading;
|
11
|
var $loading;
|
12
|
|
12
|
|
13
|
-/**
|
|
|
14
|
- * 初始化loading mask
|
|
|
15
|
- * @param $container loading容器, position:relative
|
|
|
16
|
- */
|
|
|
17
|
-function initLoadingMask() {
|
13
|
+//初始化
|
|
|
14
|
+(function() {
|
18
|
var html = '<div class="loading-mask hide"><div class="loading"></div></div>';
|
15
|
var html = '<div class="loading-mask hide"><div class="loading"></div></div>';
|
19
|
|
16
|
|
20
|
$page.append(html);
|
17
|
$page.append(html);
|
21
|
|
18
|
|
22
|
$loading = $page.children('.loading-mask');
|
19
|
$loading = $page.children('.loading-mask');
|
23
|
-}
|
20
|
+}());
|
24
|
|
21
|
|
25
|
//显示loading
|
22
|
//显示loading
|
26
|
function showLoadingMask() {
|
23
|
function showLoadingMask() {
|
|
@@ -32,6 +29,5 @@ function hideLoadingMask() { |
|
@@ -32,6 +29,5 @@ function hideLoadingMask() { |
32
|
$loading.addClass('hide');
|
29
|
$loading.addClass('hide');
|
33
|
}
|
30
|
}
|
34
|
|
31
|
|
35
|
-exports.initLoadingMask = initLoadingMask;
|
|
|
36
|
exports.showLoadingMask = showLoadingMask;
|
32
|
exports.showLoadingMask = showLoadingMask;
|
37
|
exports.hideLoadingMask = hideLoadingMask; |
33
|
exports.hideLoadingMask = hideLoadingMask; |