Guest User

Untitled

a guest
Aug 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Delimiting a text string with jQuery
  2. $('#element').find('p').text();
  3.  
  4. var names = $('#element').find('p').map(function(){
  5. return $(this).text();
  6. }).get().join(',');
  7. console.log(names); //The Beatles,Radiohead,Britney Spears
Add Comment
Please, Sign In to add comment