Your SlideShare is downloading. ×
0
jQuery Callbacks Object
Nat
2014/03/28
jQuery.Callbacks()
example
methods
 callbacks.add()
 Add a callback or a collection of callbacks to a callback list.
 callbacks.disable()
 Disabl...
methods
 callbacks.fire()
 Call all of the callbacks with the given arguments
 callbacks.fired()
 Determine if the cal...
methods
 callbacks.has()
 Determine whether a supplied callback is in a list
 callbacks.lock()
 Lock a callback list i...
Supported Flags
 Possible flags:
 once: Ensures the callback list can only be fired once (like a Deferred).
 memory: Ke...
once flag
Memory flag
unique flag
stopOnFalse flag
unique memory flags
example
references
 https://api.jquery.com/jQuery.Callbacks/
 http://stackoverflow.com/questions/8070894/when-would-i-use-jquery...
Upcoming SlideShare
Loading in...5
×

Jquery callbacks

482

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
482
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Jquery callbacks"

  1. 1. jQuery Callbacks Object Nat 2014/03/28
  2. 2. jQuery.Callbacks()
  3. 3. example
  4. 4. methods  callbacks.add()  Add a callback or a collection of callbacks to a callback list.  callbacks.disable()  Disable a callback list from doing anything more.  callbacks.disabled()  Determine if the callbacks list has been disabled.  callbacks.empty()  Remove all of the callbacks from a list.
  5. 5. methods  callbacks.fire()  Call all of the callbacks with the given arguments  callbacks.fired()  Determine if the callbacks have already been called at least once.  callbacks.fireWith()  Call all callbacks in a list with the given context and arguments.
  6. 6. methods  callbacks.has()  Determine whether a supplied callback is in a list  callbacks.lock()  Lock a callback list in its current state.  callbacks.locked()  Determine if the callbacks list has been locked.  callbacks.remove()  Remove a callback or a collection of callbacks from a callback list.
  7. 7. Supported Flags  Possible flags:  once: Ensures the callback list can only be fired once (like a Deferred).  memory: Keeps track of previous values and will call any callback added after the list has been fired right away with the latest "memorized" values (like a Deferred).  unique: Ensures a callback can only be added once (so there are no duplicates in the list).  stopOnFalse: Interrupts callings when a callback returns false.
  8. 8. once flag
  9. 9. Memory flag
  10. 10. unique flag
  11. 11. stopOnFalse flag
  12. 12. unique memory flags
  13. 13. example
  14. 14. references  https://api.jquery.com/jQuery.Callbacks/  http://stackoverflow.com/questions/8070894/when-would-i-use-jquery- callbacks
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×