0

jq-remove

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="/js/jquery.tools.min.js"></script>

</script>

<script>

$(function(){

 $(".a").click(function(){

  $("h1,h2,p").remove(".red");

 });

});

</script>

<style type="text/css">

.important

{

font-weight:bold;

font-size:xx-large;

}

.blue

{

color:blue;

}

</style>

</head>

<body>

<h1 class="red">Heading 1</h1>

<h2 class="red">Heading 2</h2>

<p class="red">This is a paragraph.</p>

<p>This is another paragraph.</p>

<br>

<button class='a'>Remove class from elements</button>

</body>

</html>

holyzhang