iI have a result ofsome text from a breadcrumb which iI am using to open menu items with on a page.
say For example, say the bctext = pastabctext = 'pasta'
.
so then iI want to target the word pasta"pasta", but not say "yadda yadda yadda pasta". onlyOnly an instance of the single word pasta."pasta" should match, or if bctextbctext
were a phrase.., then it would only find the instance of the exact phrase.
right now with the followingThis is what I have so far:
$('ul#accordion a:contains(' + bctext + ')')
i getBut this finds "yadda yadda pasta" too., of course.
is this possible?
edit:
iI get the bc textbctext
with the following:
var bctext = $('#CategoryBreadcrumb ul li:last-child').prev().children().text();
then iThen, I edit the menu with the following:
$('ul#accordion a:contains(' + bctext + ')').parent()
.addClass('special')
.children('ul')
.css('display','block');
Is what I'm going for possible?