Select even numbered elements
Description
The following code shows how to select paragraph at even position and remove their class.
Example
<html>
<head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {<!--from www. jav a 2 s . com-->
$("p:even").removeClass("blue");
});
</script>
</head>
<style>
.blue {
color: blue;
}
</style>
<body>
<p class=blue>A</p>
<p class=blue>java2s.com</p>
<p class=blue>A</p>
</body>
</html>