removeClass with jQuery

Asked

Viewed 46 times

0

Guys use the following code in jQuery to remove a class from a TR one-table.

$("tr").removeClass('text-white');

It works very well, but it is removing the tr of all tables, I want to know how to remove only from the table class="dados".

  • The table is generated dynamically with Javascript?

  • yes, but I’ve already solved it with the help of @Giovane

2 answers

2


Try $("table.dados tr").removeClass('text-white');

  • Perfect, it worked 100%

1

Good morning, my friend.

You can solve your problem this way:

$("table.dados tr").removeClass('text-white');

He’ll get all the tr of all tables containing the class dice.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.