jq 点击除了某元素以外的其他所有元素

$('body').click(function(e){
            if(($(e.target).attr('class')!='header-top-nav-ipt')){
              alert('除了class=header-top-nav-ipt以外的元素')
            }
        });
原文地址:https://www.cnblogs.com/shark1100913/p/11859299.html