removeClass with jQuery

0

I use the following code in jQuery to remove a class from a TR of a table.

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

It works fine, but it's removing the tr from all tables, I want to know how to remove only from the class="dados" table.

    
asked by anonymous 03.11.2016 / 13:14

2 answers

2

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

    
03.11.2016 / 13:23
1

Good morning, my friend.

You can solve your problem this way:

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

It will get all the tr of all tables that contain the data class.

    
03.11.2016 / 13:35