I have this code:
$doc.find('#g').on('click', function(e) {
$target = $doc.find('#g form');
$target.toggle();
$doc.find('#g input[type="text"]').focus();
});
I want it to stop triggering on children so this works:
$doc.find('#g form').on('click', function(e){
e.stopPropagation();
});
So using #g form
works, but selectors like #g *
or #g>*
or .children()
do not work, why?
The html structure is like this:
<div id="g" title="look up">
<i class="fa fa-search-plus"></i>
<i class="fa fa-search-minus" style="display: none"></i>
<div></div>
<form><div>
<input>
<input>
<input>
<input>
</div>
<input><input><input></form>
</div>