Skip to content

Instantly share code, notes, and snippets.

@umanda
Created May 20, 2020 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umanda/8e27f03bcd32162ee50dfd7a4a9665e2 to your computer and use it in GitHub Desktop.
Save umanda/8e27f03bcd32162ee50dfd7a4a9665e2 to your computer and use it in GitHub Desktop.
jquery chaining
var obj = { // every method returns obj---------v
first: function() { console.log('first'); return obj; },
second: function() { console.log('second'); return obj; },
third: function() { console.log('third'); return obj; }
}
obj.first().second().third();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment