-1
$("td").className='';

Trying to do something like this where it makes all the <TD> elements the requested css class. I don't even know if thats the proper way to do it.

Jake
  • 1,429
  • 4
  • 18
  • 39

2 Answers2

4

You want to use addClass():

$('td').addClass('yourClassName');
mVChr
  • 48,301
  • 11
  • 105
  • 100
  • Thank you very much, not used to using $() for elements and such. I'll mark this as accepted when it lets me. – Jake Jun 30 '12 at 00:08
2

Or you can use attr().

$('td').attr('class', 'className');
Derek 朕會功夫
  • 88,688
  • 41
  • 174
  • 241
DamianS1987
  • 302
  • 1
  • 3
  • 12