Jquery callbacks
Upcoming SlideShare
Loading in...5
×
 

Jquery callbacks

on

  • 415 views

 

Statistics

Views

Total Views
415
Views on SlideShare
415
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Jquery callbacks Jquery callbacks Presentation Transcript

  • 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()  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.
  • 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.
  • 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.
  • 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.
  • 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- callbacks