Home  >  Article  >  Web Front-end  >  Loading effect sample code under Jquery easyui_jquery

Loading effect sample code under Jquery easyui_jquery

WBOY
WBOYOriginal
2016-05-16 17:25:53951browse
Copy code The code is as follows:

//Using jquery easyui loading css effect
function ajaxLoading() {
$("
").css({display:"block",width:"100%",height:$(window). height()}).appendTo("body");
$("
").html("Processing, please wait . . ").appendTo("body").css({display:"block",left:($(document.body).outerWidth(true) - 190) / 2,top:($(window). height() - 45) / 2});
}
function ajaxLoadEnd(){
$(".datagrid-mask").remove();
$(".datagrid-mask -msg").remove();                                    
}

$.ajax({
type: 'POST',
url: 'sendLettersAgain.action',
data: { id:obj.id},
beforeSend:ajaxLoading,\Open the progress bar before sending the request
success: function(robj){
ajaxLoadEnd();\Task execution is successful, close the progress bar
}
});
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn