i have a div(target) controlled(show/hide) by a button. When the button is triggered the div will show up.. at that moment when i click outside anywhere other than button or that div(target). the div(target) should get hide.
i have tried with the event.stopPropagation();
but no result found
button
<div class="applicationTrigger appbtn">
<i class="so-icon"></i>
</div>
target div
<div class="app-drop"></div>
when i use event.stopPropagation();
method the complete button action is not working.