Created
January 18, 2015 07:16
-
-
Save fmtarif/c0780eea96e5e2bcc930 to your computer and use it in GitHub Desktop.
#js #jquery snippets
This file contains hidden or 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
| //get all texts joined by a delimiter from a selector that returns multiple elements | |
| //useful for getting all links for example from youtube page, extract names from list etc | |
| $("ul li").map(function() {return $(this).text()}).get().join("\n") | |
| $("ul li").map(function() {return $(this).text()}).get().join(",") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment