I am preparing a compressed list, when a user clicks on an item, the clicked item expands Before I do all other things fall. I want to wait till all the elements collapse for the expansion of the item, but I do not know how to do it. (Not true, all this happens together)
How can I wait until all the items fall before running the rest of the code?
$ ("content"). (); This is what I am trying to:
$ ("content"). SlideUp (function () {Warning ("done");});
You can use the .promise () method Collection of Elements:
$ ('content'). promise (). Then (function () {// all animations have ended}); From the to:
.promise ()method prompts a dynamic form that once collected all the tasks, Some type, bound to or not bound, has expired.By default, the type is "Fx", which means that the return promise is solved when all the animations of the selected elements are completed.
Comments
Post a Comment