另一种使您的jsfiddle减少错误的方法(需要双击打开)。
这不会在主体级别使用任何委托事件
设置
tabindex="-1"为DIV .popup(以及样式CSS
outline:0)
$(".link").click(function(e){ e.preventDefault(); $(".popup").fadeIn(300,function(){$(this).focus();});});$('.close').click(function() { $(".popup").fadeOut(300);});$(".popup").on('blur',function(){ $(this).fadeOut(300);});


