Thread: Loading Gif
View Single Post
Old 11-22-2012, 04:21 PM   PM User | #3
searls03
New Coder

 
Join Date: Jun 2011
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
searls03 is an unknown quantity at this point
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");
}
})
})
searls03 is offline   Reply With Quote