Skip to content

Instantly share code, notes, and snippets.

@linuxbender
Created September 28, 2011 20:09
Show Gist options
  • Select an option

  • Save linuxbender/1249109 to your computer and use it in GitHub Desktop.

Select an option

Save linuxbender/1249109 to your computer and use it in GitHub Desktop.
zebra.js
$("tr:nth-child(odd)").addClass("odd");
$("tr:nth-child(odd)").hover(function(){
$(this).addClass("odd_over");
},function(){
$(this).addClass("odd_out");
});
$("tr:nth-child(even)").hover(function(){
$(this).addClass("even_over");
},function(){
$(this).addClass("even_out");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment