I have input. When i focus out on that input the focus out event gets triggered. But under that input i am having
<div id="myDiv">
<ul>
<li>1</li>
</ul>
</div>
i want focus out event to be triggered when the inputs gets focus out - but when this under - when it is clicked - i don't want the focusing out of the input to ba happened.
I tried this here:
How to exclude Id from focusout
$('#id').focusout (function (e) {
if (e.relatedTarget && e.relatedTarget.id === 'dontFocusOut') {
return;
}
//do your thing
});
but it does not work for me - in event.relatedTarget
i always get null.