I like to use CSS classes in an external stylesheet and then use the addClass method. I find the maintenance much easier this way.
$('td').addClass('myCSSClass'); to remove the CSS Class $('td').removeClass('myCSSClass') On Dec 6, 6:09 pm, Joshua Partogi <joshua.part...@gmail.com> wrote: > Hi all, > > What is the cleanest approach to remove a css attribute from the DOM element? > > Currently I have a DOM element which has css background color as such: > <td style="background-color: #000"> > > This is currently what I do: > $('td').css('background-color','').append(replacement); > > But I'm not sure that is the good approach. Or is it? > > Kind regards, > > --http://jobs.scrum8.com|http://twitter.com/scrum8