|
two questions, how do I stop it once loaded, and currently, it only is animating after the ajax loads, not while it is loading.....is this how it should look?
<script type="text/javascript">
$.ajaxSetup({
beforeSend: function() {
$('#bo').html('<img src="pics/loadingAnimation.gif" />');
}
});
$(function(){
$.ajax({
type:"POST",
url:"news_load1.php",
data:"getNews=true",
success: function(r){
$("#newsContent").html(r)
},
error: function(){
alert("could not retrieve any news articles");
}
})
})
|