Im trying to add a class to another element if an element contains text.
So let’s say I have a <td> classified as vCSS_breadcrumb_td. How can I check is the <td> contains a word, and if it does contain that word, add a class to an <a> classified is nav1.
I know that I could probably make use of the :contains selector, I just don’t know how to write an if statement
You need to check the
lengthproperty, since jQuery always returns an Array-like object.