<script type="text/javascript">
$(function () {
$.ajax2 = function (options) {
var img = $("#progressImgage");
var mask = $("#maskOfProgressImage");
var complete = options.complete;
options.complete = function (httpRequest, status) {
img.hide();
mask.hide();
if (complete) {
complete(httpRequest, status);
}
};
options.async = false;
/*
img.show().css({
"position": "fixed",
"top": "50%",
"left": "50%",
"margin-top": function () { return -1 * img.height() / 2; },
"margin-left": function () { return -1 * img.width() / 2; }
});
*/
img.show().animate({
position: "fixed",
top: "50%",
left: "50%",
marginTop:function () { return -1 * img.height() / 2; },
marginLeft: function () { return -1 * img.width() / 2; }
}, 3000 );
mask.show().css("opacity", "0.1");
$.ajax(options);
};
});
</script>
$.ajax2({
url: url,
data:"contentId="+contentId,
success:function(data){
var last_mb20Temp = $(".mb_20:last");
last_mb20Temp.after(data);
mbIndex = $(".mb_20").index(last_mb20Temp);
}
});
<img id="progressImgage" class="progress hide" alt=""
src="/${res}/img/p_w_picpaths/loading.gif" />
<div id="maskOfProgressImage" class="mask hide"></div>
扩展ajax ,请求等待图片展示
原创
©著作权归作者所有:来自51CTO博客作者v512345的原创作品,请联系作者获取转载授权,否则将追究法律责任
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
图片展示
label中展示图片,注意在src中存放logo.png
ico 获取图片 java