Tell me how it would be better to process such requests here:
$('.class1').on('click', function(e){ if ((e.target != undefined) && (e.target.parentNode != undefined) && (e.target.parentNode.className != 'class2')) return; // тут остальной код } those. not to do such nested checks.
As an option, you can always write your own function, which accepts a string as input, parses it and further checks the object in stages
if ((myValidate(e, 'target.parentNode.className') == true) && (e.target.parentNode.className != 'class2'){...} but can there be standard tools, at least in the same jQuery?