1.

Explain the .promise() method in jQuery.

Answer»

  • The .promise() method returns a dynamically generated promise that is resolved when all actions of a certain type bound to the collection, queued or not, have ended.

  • The method takes two optional arguments:


    • type - The default type is “fx” which indicates that the returned promise is resolved only when all animations of the selected elements have been completed.


    • target - If a target object is specified, .promise() will attach to promise to that specified object and then return it rather than creating a new one.






Discussion

No Comment Found