Just found the match() function. Ended up with this.
elements.each(function(el){
if(el.get('title').match(word)) {
// do stuff
}
});
On Apr 21, 7:58 pm, rpflo <[email protected]> wrote:
> So I've got this:
>
> var word = "blah";
> var elements = $$('.elements');
> var filteredElements = elements.filter(':contains("'+word+'")');
>
> That looks inside the text of the thing, is there a way to have it
> look at the title of the elements instead?
>
> Here's some fake code to maybe get a better idea of what I'm looking
> for:
>
> var filtereElements = elements.filter('[title:contains("'+word+")]');