a have an asp repeater that is repeating a links on a page with different urls. I want to hide any links (using jquery) that contain the word ‘text’ in their href. How can i do this?
if($(".fsproductsStcokistButton:contains('text')"))
{
$(this).css("display", "none");
}
You can just chain it, like this:
.hide()is a shortcut for thedisplay: none;, and the selector itself will only return the elements that contain that text, so you’re all set. For an attribute check, likehref, use an attribute-contains selector, like this: