Specify the element to not select ($(":not(selector)"))
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="lib/jquery/jquery-1.3.2.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("p:not(.intro)").css("background-color", "red");
});
</script>
</head>
<body>
<p class="intro">This is first paragraph</p>
<p>This is second paragraph</p>
<p>This is this paragraph</p>
</body>
</html>
Comments
Post a Comment