Created
May 20, 2020 13:43
-
-
Save umanda/8e27f03bcd32162ee50dfd7a4a9665e2 to your computer and use it in GitHub Desktop.
jquery chaining
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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