I don't understand why JQuery is not working in the following html sample code:
The second div is working as expected when clicking on it. But the first div is not working at all with JQuery.
I have never used JQuery before, please help to explain. Thanks.
<html>
<head>
<script src="jquery.js"></script>
<script language="javascript">
$(".header_logo").click(function () {
alert("It doesn't work with JQuery function.");
});
</script>
</head>
<body>
<div class="header_logo">Click with JQuery</div>
<hr/>
<div style="background-color:gray;" onclick="javascript:alert('It works with Onclick');">Click with Onclick</div>
</body>
</html>