<html lang="en">
<head>
<title>jQuery :prop() Method Return Propery and Value</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.mybtn').click(function(){
var mystyle = $( ".mypara" ).prop("class");
alert(mystyle);
});
});
</script>
</head>
<body>
<h2>jQuery :prop() Method Return Propery and Value</h2>
<button type="button" class="mybtn">Click to Return property</button>
<p class="mypara" style="color:red;">This is my paragraph.</p>
</body>
</html>