Use a jQuery method to remove the "important" class from the <p> element. - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:removeClass

Description

Use a jQuery method to remove the "important" class from the <p> element.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("p").removeClass("important");
});//from ww w.jav  a 2  s.  co m
</script>
<style>
.important {
    font-weight: bold;
    font-size: xx-large;
    background-color: yellow;
}
</style>
</head>
<body>

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

</body>
</html>

Related Tutorials