당신은의 중심에 이미지와 함께 아무것도에서 사용자를 차단하기 위해 할 수있는 페이지 차단 사업부를
$("elemnt").click(function(){
$("loader-img").show();
$.ajax({
url : "your url",
complete: function(){
$("loader-img").hide();
}
});
});
로더 이미지처럼 뭔가를 할 수 뷰포트.
이 이벤트는 성공적인/실패한 Ajax 요청의 경우에 호출되므로 완전한 이벤트가 사용됩니다. 그런 다음 차단기를 표시하는 showBlocker()
메소드를 호출
function showBlocker(){
$(".blocker .img").css({
top: $(window).height()/2,
left: $(window).width()/2
});
$(".blocker").show().css({
height: $(document).height()
});
}
스크립트
에서 다음
<style type="text/css">
.blocker{
z-index: 99999;
opacity: .5;
height: 100px;
position: fixed;
background: none repeat scroll 0 0 lightgrey;
width: 100%;
}
.blocker .img{
position: fixed;
color: red;
}
</style>
<body>
<div class="blocker" style="display: none">
<div class="img">img</div>
</div>
.............
.............
.............
처럼 뭔가를 할 수
편집.
필요에 맞게 답변을 조정할 수 있습니다. 이것은 달성 할 수있는 샘플 일뿐입니다.
블로킹 div는 절대 위치가 페이지의 중앙에 있어야하므로 클릭을 방지 할 수 있습니까? – kamiar3001
감사합니다. 너무 완전하고 좋은 anwser입니다. – kamiar3001