Use Bootstrap and it has the following classes for tables:
-
.table
-
.table-striped
-
.table-bordered
-
.table-hover
-
.table-condensed
In my application I have several tables. For ease of maintenance, I created the .tabela
class and used jQuery to add the classes I want:
jQuery.ready(function() {
$(".tabela")
.addClass("table table-striped table-bordered");
});
So I can easily modify all the tables in the application by editing just the section above if you want to add / remove these Bootstrap classes.
My question is whether you would not have a way to use CSS to incorporate these classes into the .tabela
class. I think this would be better practice than using Javascript.