Created
April 29, 2014 22:21
-
-
Save jedahan/f956ef565c6472a07fb7 to your computer and use it in GitHub Desktop.
filtering a gallery
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 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