How to add exception in this jquery code?
Posted
by metal-gear-solid
on Stack Overflow
See other posts from Stack Overflow
or by metal-gear-solid
Published on 2010-05-19T14:02:54Z
Indexed on
2010/05/19
14:10 UTC
Read the original article
Hit count: 226
How to add exception in this jquery code?
$(function() {
$("table tr:nth-child(even)").addClass("striped");
});
this code is applying on all tables.
but for specfic pages i don't want strip effect.
I've differnt body id on each page.
I want to know how to add exception for a id.
$(function() {
$("table tr:nth-child(even)").addClass("striped");
//I want to add exception to not to add striped class to only to page with <body id="nostrip">
});
© Stack Overflow or respective owner