December 8, 2022

WeAnswer

The complete guide to the beginners as well as to the experienced Web Developers

Stop click event on parent element

Stop click event on the parent element by below code. When you bind client event child element then it will automatically be clicked parent element.

 

EX code:1

<div id=”element_id1″>

<div id=”element_id2″>

</div>

</div>

Ex code:2

<div id=”element_id1″>

<div id=”element_id2″ onclick=”clickonelement2(event)” >

</div>

</div>