在鼠标点击失去焦点的时候,隐藏DIV的实现如下:
$(document).ready(function() {
//单击阻止冒泡事件
$("#btnShow").click(function(event){
event.preventDefault();
event.stopImmediatePropagation();
$("#hideDIV").show();
});
//隐藏DIV阻止冒泡事件
$("#hideDIV").click(function(event){
event.preventDefault();
event.stopImmediatePropagation();
});
});
//全屏点击事件
$(document).click(function(event){
$("#hideDIV").hide();
});