removeClass() - 從被選元素刪除一個或多個CSS •
<html><head><script type="text/javascript"src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script><script>$(document).ready(function(){$("#allCssForEachElement").click(function(){$("#import").addClass("important");$("#blue").addClass("blue");});$("#allMultiCssForOneElement").click(function(){$("#import").addClass("important blue");});$("#RemoveCssForOneElement").click(function(){$("#import").removeClass("blue");});$("#ToggleCssForOneElement").click(function(){$("#import").toggleClass("blue");});});</script><style type="text/css">.important{font-weight:bold;font-size:xx-large;}.blue{color:blue;}</style></head><body><p id="import">Important Text for operator CSS</p><p id="blue">Blue Text for operator CSS</p><br><button id="allCssForEachElement">allCssForEachElement</button><button id="allMultiCssForOneElement">allMultiCssIntoImport</button><button id="RemoveCssForOneElement">RemoveBlueCssFromImport</button><button id="ToggleCssForOneElement">ToggleBlueCssFromImport</button></body></html>
css("propertyname");
css("propertyname","value");
css({"propertyname":"value","propertyname":"value",...});