There's something going wrong with my java script code. I have a basic html page and this code
<div class="myclass" id="myid">
<h3 class="myotherclass"><?php echo _("Some sentence"); ?></h3>
</div>
When I put this script :
<script type="text/javascript">
$("div").click(function () {
alert('hello');
});
</script>
the click on the div tag triggers the alert message, but when I put this :
<script type="text/javascript">
$("h3").click(function () {
alert('hello');
});
</script>
nothing is triggered. Could some explain this ?