I'm facing an issue with a click event in a script that is associated with a specific div id. When I move the mouse within the div area and click (the cursor remains unchanged), the event listener does not activate. How can I make the div area clickable?
<script>
var myEl = document.getElementById('dealdata');
myEl.addEventListener('click', function() {
alert('Hello world');
}, false);
</script>
<td BGCOLOR="#91be40" align="center" valign="center">
<div id="dealdata">
<br /><?echo $dpromo;?>
<h1><?echo $dealvalue; ?></h1>
</div>
</td>