javascript - jQuery best Practice: hide / doSomething / show sequence -
What is the best practice to complete the following workflow:
$ (" # MyDiv "). Hide (); $ .getJSON ("url", function (data) {... snorrr ... hours later ...}); . $ ("# MyDiv") slideDown ();
The above sequence has spent hours in Divine Beaver: - (
Thanks er
Just place a call in the callback.
$ (" # myDiv "). Hide (); $ .getJSON (" url ", function ( Data ... {... snorrr ... hours later ... $ ("# myDiv"). SlideDown ();});
In addition to show some indicators you want , So that the user knows that something is going on.
Comments
Post a Comment