Even and Odd index

Submitted by:David Villa

Date added:02 July, 2012

Category:jQuery

:even and :odd (Select elements with an even index or odd index elements. The index starts from 0.)

Tags: even index element , odd index element

Code Snippet:

$(document).ready(function () {
$('tr:even').css('color', '#00FF00');
$('tr:odd').css('color', '#0000FF');
});
 
 

Comments