<!DOCTYPE html>
<html>
<head>
<title>jQuery hasClass() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
alert($("p").hasClass("param"));
});
});
</script>
<style type="text/css">
.param {
font: 16px Verdana, Arial;
font-weight:bold;
color:pink;
}
</style>
</head>
<body>
<p>First paragraph start here...</p>
<p class="param">Second paragraph start here...</p>
<p>Third paragraph start here...</p>
<button>Click here to call hasClass() method</button>
</body>
</html>