Jquery: If A Table Header Has A Class, Add Class To Table Cell
Let's say I have the following html:
Header1 | Header2<Solution 1:I think you don't see how jquery selectors work.
Here a code that should work :
Checking if the td has a class is not necessary, since addClass does nothing if you give it an empty parameter. Solution 2:Try
Demo: Fiddle Solution 3:Your code doesn't do what you think it does:
etc, etc. Your code does nothing with the What could be done:
Solution 4:None of your addClass strings are valid. Whan adding a class you only provide the className.... no
Now to add to the TD can simply use selector
Solution 5:Here is a solution: (fiddle here)
| Has A Class, Add Class To Table Cell | "
|
---|
Post a Comment for "Jquery: If A Table Header