0
我有一个通知div,如果用户点击.notification-popup将弹出。我试图这样做,popop div会隐藏每当用户点击该DIV的一面。jquery - 隐藏div点击正文
目前我有这样的:
$('body').on('click', function (e) {
$('.notification-list-wrapper').each(function() {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.notification-list-wrapper').has(e.target).length === 0) {
$(this).hide();
}
});
});
当我点击.notification-弹出虽然随着这个没什么甚至发生。
我应该改变什么?
你打我几秒钟,darn:P – Terry