Skip to content

Instantly share code, notes, and snippets.

@sanderversluys
Created December 13, 2013 14:07
Show Gist options
  • Save sanderversluys/7944736 to your computer and use it in GitHub Desktop.
Save sanderversluys/7944736 to your computer and use it in GitHub Desktop.
var boysSection = false;
var test = $('#mw-content-text p a').map(function(data, w) {
var $name = $(w);
var name = $name.text();
if (name == "Aad") boysSection = true;
var isBoy = boysSection || $('*:contains("'+name+' (+m)")').length > 0;
var isGirl = !boysSection || $('*:contains("'+name+' (+v)")').length > 0;
return {"boy":isBoy, "girl":isGirl, "name":name};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment