jQuery find string then change class
I am trying to make this code that will find a certain text string and add a class to the certain <td>
code is below...and i'm trying to think of everything that i can do to make this work
tried it does not work :(
- $
(
function
()
{
var foundin
=
$
(
'tr:contains
(
"KandiMan666"
)
'
)
;
if
$
(
"tr.post"
).
addClass
(
"classname"
).
removeClass
(
".post"
)
;
else
$
(
"tr.post"
).
removeClass
(
"classname"
)
;
}
)
;