Skip to content

Instantly share code, notes, and snippets.

@jedahan
Created April 29, 2014 22:21
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 jedahan/f956ef565c6472a07fb7 to your computer and use it in GitHub Desktop.
Save jedahan/f956ef565c6472a07fb7 to your computer and use it in GitHub Desktop.
filtering a gallery
var isNumberLess = function(text){
return ! /[0-9]+/.test(text);
}
var all_paragraphs = $('.checklist-desc > p');
for(int i=0; i<all_paragraphs.length; i++){
var filtered = all_paragraphs[i].textContent.split('\n').filter(isNumberLess);
console.log(filtered[filtered.length-1]+',');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment