Reputation: 965
I want to find if a link containing the word 'gathered'.
I am aware of the logic to get it but I am struggling to have a jQuery sintax for the selector:
if (index === 3) {
var $link = $('#rest').find('.trigger');
var $currentLinkPage = $link.eq(index - 1);
$($currentLinkPage + ":contains('gathered')").......
}
The console returns: 'Syntax error, unrecognized expression: [object Object]:contains('gathered')'
Is there a way of using :contains
in this case?
Upvotes: 0
Views: 26
Reputation: 42099
$currentLinkPage.filter(':contains("gathered")')
$currentLinkPage
is a jQuery object of .trigger
elementsNote: eq
may not be what you need, update your question for what you're trying to get at
Upvotes: 1