When a container object, such as a div, has mouse capture, events originating on objects within that container are fired by the div, unless the bContainerCapture parameter of the setCapture method is set to false. Passing the value false causes the container to no longer capture all document events. Instead, objects within that container still fire events, and those events also bubble as expected.
// 消息框loading function loading(){ var o = $('#body_loading'); o.css("left",(($(document).width())/2-(parseInt(o.width())/2))+"px"); o.css("top",(($(document).height()+$(document).scrollTop())/2-(parseInt(o.height())/2))+"px"); o.fadeIn("fast"); } // 消息框消失 function loaded(){ var o = $('#body_loading'); o.fadeOut("fast"); } // 隐藏浮动窗口 function hideupload(){ $('#show_upload').hide(); $('#show_upload_iframe').hide(); } // 弹出浮动窗口 function showupload(ajaxurl){ loading(); var o=$('#show_upload'); var f=$('#show_upload_iframe'); var top = 200; $.ajax({ url: ajaxurl, //cache: false, success: function(res){ loaded(); o.html(res); o.css("left",(($(document).width())/2-(parseInt(o.width())/2))+"px"); if($(document).scrollTop()>200){ top = ($(document).height()+$(document).scrollTop())/2-(parseInt(o.height())/2); } o.css("top",top+"px"); f.css({'width':o.width(),'height':o.height(),'left':o.css('left'),'top':o.css('top')}); f.show(); o.show(); } }); }
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn