I cannot get the value of attribute alt of img tag
Following is for Getting the value of attribute alt of img tag
<html>
<head>
<script>
$('img').click(function () {
var alt = $(this).attr("alt")
alert(alt);
});
</script>
</head>
<img src="white.png" width="25px" height="25px" alt="1" id="star1" onmouseover="starOverOne()" onmouseout="starOutOne()"/>
Here Nothing displayed in alertbox..Can you help me??