$(function() { $(function() { $(".A").focus(); }); $(".A").blur(function() { alert(0); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="A" tabIndex="1"> <input type="text> <a href=" ">Tra-ta-ta</a> <div> <input type=text"> </div> </div> The event fires even if I set the focus to text fields that are children of "A". How to make that blur does not work on children?
$(function () { $(function () { $(".A").focus(); }); $(".A").blur(function () { alert(0); }); });- aat