JSFiddle - React, Tailwind, and code Playground
HTML
<div id="seeds">
<div id="one">one</div>
<div id="two">two</div>
<div id="three">three</div>
</div>
<a href="#">one</a>
<a href="#">on</a>
<a href="#">One</a>
<a href="#">two</a>
<a href="#">Two</a>
<a href="#">three</a>
<a href="#">Three</a>
JavaScript
$("a").live("click", function(event){
var seed = $(this).text(),
found = false;
$.each($('#seeds').find('*'), function () {
if ($(this).text() == seed) {
found = true;
}
});
if (found){
alert("already have it");
}
else {
alert('that\'s new');
}
return false;
});