Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created July 14, 2011 03:30
Show Gist options
  • Save fcamel/1081892 to your computer and use it in GitHub Desktop.
Save fcamel/1081892 to your computer and use it in GitHub Desktop.
jquery: split + trim
f = $("<div>a, b, c</div>"); // [<div>​a, b, c​</div>​]
$.map(f.html().split(","), $.trim); // ["a", "b", "c"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment