Does anyone have an idea of how to create something like this?
I have 2 elements, lets say one div in another, one will be the main div the other will be a subdiv of the first.
The onclick of the element need to be called only from the div it was press on.
A little example:
<!-- 2 div's one into another -->
<div style="border:1px solid; padding: 50px;" onclick="alert(1);">
Main div
<div style="border:1px solid; padding: 10px; text-align:center;" onclick="alert(2);">
Sub div
</div>
</div>
So, when I press on the main div should appear alert(1), when I press on the subdiv should appear alert(2) and not both alerts.
Any suggestion (links, tutorials, ideas, etc.) on how to do this is realy appreciated.