这里我的代码是:
<script src="http://code.jquery.com/jquery-1.6.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#pop").click(function(){
$("#overlay_form").fadeIn(1000);
positionPopup();
});
function positionPopup()
{
if(!$("#overlay_form").is(':visible')){
return;
}
$("#overlay_form").css({
left: ($(window).width() - $('#overlay_form').width()) / 2,
top: ($(window).width() - $('#overlay_form').width()) / 7,
position:'absolute'
});
}
$(window).bind('resize',positionPopup);
</script>
<style>
#overlay_form{position: absolute;border: 5px solid gray;padding: 10px;background: white; width: 380px;height: 120px;border-radius:20px;}
</style>
<div id="overlay_form" style="display:none;">
<p>hello</p>
</div>
我需要禁用背景点击事件。