I have two rectangles with some text inside. I would like to display a different alert when I click on each one, but code below doesn’t work (alert is not displayed). Any ideas? Thanks
<div id="panel0" style="width: 100%">
<div class="titleBox" id="rect0" onclick="alert('yeah1');"
style="height: 85px; width: 85px;">Hello</div>
<div class="titleBox" id="rect1" onclick="alert('yeah2');"
style="height: 85px; width: 85px;">Hello</div>
</div>
Try this