There is a layer, it contains various elements - buttons, links, drop-down menus, etc. How to block all events of these elements through the layer?

$('.item-content a, .item-content input, .item-content button, .item-content image').click(function(event) { event.stopPropagation(); event.preventDefault(); }); 

Now this "stub" is used, but how to do something like:

 $('.item-content').click(function(event) { event.stopPropagation(); event.preventDefault(); }); 

    1 answer 1

    Can?

     $('.item-content *').click(function(event) { event.stopPropagation(); event.preventDefault(); 

    });

    • In general, fortune telling is not good, but the option came up, thanks - Anton Shamanov