Your SlideShare is downloading. ×
0
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Jquery callbacks
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Jquery callbacks

475

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
475
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. jQuery Callbacks Object Nat 2014/03/28
  • 2. jQuery.Callbacks()
  • 3. example
  • 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. 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. 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. 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. once flag
  • 9. Memory flag
  • 10. unique flag
  • 11. stopOnFalse flag
  • 12. unique memory flags
  • 13. example
  • 14. references  https://api.jquery.com/jQuery.Callbacks/  http://stackoverflow.com/questions/8070894/when-would-i-use-jquery- callbacks

×