Add a loading graphic jquery
Posted
by sea_1987
on Stack Overflow
See other posts from Stack Overflow
or by sea_1987
Published on 2010-04-13T09:19:18Z
Indexed on
2010/04/13
9:22 UTC
Read the original article
Hit count: 256
I am using the jquery ajax api so load in some content, the code looks like this,
$.ajax({
type:"POST",
url:"/search/location",
data: getQuery,
success:function(data){
//alert(getQuery);
//console.log(data);
$('body.secEmp').html(data); //overwrite current data
setUpRegionCheckBoxes(); //fire function again to reload DOM
}
});
In my HTML i have <div id="loading">Loading Content</div>
this is has a css style on it of display:none
, while my ajax is bring in the content I want to show the div that is hidden, but I cant find a away too have tried attaching .ajaxStart
on my loading div then doing show()
but that did not work.
Any advice?
© Stack Overflow or respective owner