Another common solution is to have an image or a div that you just
show while loading and hide using the callback function...

<script type="text/JavaScript">

$(document).ready(function(){
  $('#loadImg').show();
  var fCallback = function(){ $('#loadImg').hide(); }
  $("#show").load("file.php", fCallback);
});

</script>

<div id="show"></div>
<img id="loadImg" src="loading.gif" />

On Sep 1, 8:09 am, Eridius <[EMAIL PROTECTED]> wrote:
> What i would do is add a class with addClass() to the div that has the
> background-image of the animated loading gif and then on the load() function
> , set the callback function to remove that so that when it is dome loading
> it will remove the image.
>
>
>
> [EMAIL PROTECTED] wrote:
>
> > Hello Friends,
>
> > i am new to jquery and this group as this is my first post and just
> > started to work with jquery.
>
> > My question is how can we use and loading indicator while we are
> > extracting some data from other file with load function. The code i am
> > using is as follow :-
>
> > <script type="text/JavaScript">
> > $(document).ready(function(){
> > $("#show").load("file.php")
> > });
> > </script>
>
> > <div id="show"></div>
>
> > currently i am using simple codes to start with.
>
> > Can anyone tell me how can we show the loading indicator with above
> > code ?
>
> > Thanks
>
> --
> View this message in 
> context:http://www.nabble.com/A-Newbie-Question-tf4364759s15494.html#a12441106
> Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to