removeClass([class])
将匹配集合中每个元素的样式‘[class]’删除。其中class可以是一个或是多个,多个以空格隔开
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p:even").removeClass("blue");
});
</script>
<style>
p { margin: 4px; font-size:16px; font-weight:bolder; }
.blue { color:blue; }
.under { text-decoration:underline; }
.highlight { background:yellow; }
</style>
</head>
<body>
<p class="blue under">Hello</p>
<p class="blue under highlight">and</p>
<p class="blue under">then</p>
<p class="blue under">Goodbye</p>
</body>
</html>
$("p:even").removeClass("blue");
将p元素集合中索引为偶数的p元素样式‘blue’删除。以下为对应p元素
<p class="blue under">Hello</p>
<p class="blue under">then</p>