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

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -