Search

Wednesday, September 28, 2011

Beautify table with jquery selectors :even and :odd

If we talk about the Data Represent into the Website than it is better the best way to display your data into tables, cause IE6 creates lots of problem to in CSS to align the data. And Jquery plays his important roll to beautify that tables Data. The :even, :odd selectors make it beautiful to represent the data. Here is an example :
$('table').css({
	'border-collapse':'collapse'
});

$('tr th').css({'background':'#666666', 'color':'#ffffff', 'font-family':'verdana', 'font-weight':'normal'});

// Here using jquery selectors
$('tr:even').css({'background':'#c3c3c3'});
$('tr:odd').css({'background':'#e3e3e3'});
This code will output similar as like
Jquery Selectors Effects on Table

1 comment:

Anonymous said...

really Helpful code for beautifying web site with beautiful table........

Related Posts Plugin for WordPress, Blogger...