I currently have a small problem with jQuery with a contains statement. It is catching all possible matches when I want the exact match. I realized that a filter statement would probably be one of the best repalcements to get an exact match.
However, I have looked through multiple examples and still can’t quite get this statement to work.
Here is the original statement with the contains in it.
function showDropDown(){
$(".sf-with-ul):contains('"+stringToMatch+"')").parent().showSuperfishUl();
};
This statement is supposed to show a dropdown menu and will show multiple menus. If one menu has “This” and another has “This1” and I says contains “This” I get both. I want to create a statement with filter in it.
Thanks
There is an extra
)in the selector. Try this:or: