关于jQuery点击页面上指定元素以外的节点元素执行函数以下文字资料是由3搜网小编为大家搜集整理后发布的内容,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“jQuery点击页面上指定元素以外的节点元素执行函数”文章吧。
jQuery点击页面上指定元素以外的节点元素执行函数
$(document).click(function(e){
if(e.target===problemInputTextarea[i]&&$(problemInputTextarea[i]).val().length>0){
console.log("点击小叉号");
problemInputSmallXArr[i].css("display","inline");
}else if(e.target.className!="inputSmallX"&&e.target!=problemInputTextarea[i]){
console.log("不点击小叉号");
problemInputSmallXArr[i].css("display","none");
}
});
以上就是关于“jQuery点击页面上指定元素以外的节点元素执行函数”这篇文章的内容,希望分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注3搜网技术频道。