JQuery Tutorial 23 - Even odd selectors With Example

<html lang="en">
   <script src="js/jquery.js" type="text/javascript"></script>
 <style type="text/css">
  .table, .table tr, .table td{
   border: 1px red solid;
  .ChangeColor {background-color:yellow;}

 <div class="divison">
  <p> first para</p>
  <p> second para</p>
  <P> third para</p>
  <p> fourth para</p>
<table class="table">
<tr><td>First row</td></tr>
<tr><td>Second row</td></tr>
<tr><td>Third row</td></tr>
<tr><td>Fourth row</td></tr>
  $('.table tr:even').addClass('ChangeColor');
  $('.divison p:even').addClass('ChangeColor');


Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar