i have a jquery loop that looks like this.
the line: tagsArr.push($(this).html().toLowerCase());Code:var tagsArr=new Array(); $('.thumb_tag').each(function(){ var htmlStr = $(this).html(); $(htmlStr).find('a').each(function(){ tagsArr.push($(this).html().toLowerCase()); }); });
will find all 'a' elements of this loop and display it
my question:
how can i set a "filter" so that i can do something like this
Code:if ($(htmlStr).find('a').match(/\bdesign\b/)){ // the \b is a word boundary and the word i want to only output is design tagsArr.push($(this).html().toLowerCase()); }



Reply With Quote
Bookmarks