I like to use the addClass method rather than embed CSS in my js
code.  I find it easier to maintain.

$('td').addClass('myCSSClass');

$('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

Reply via email to