Add a loading graphic jquery
- by sea_1987
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?