사용자함수 배경화면 전체 Dimmed 처리 함수
페이지 정보
작성자 너갱이 작성일 15-05-15 16:20 조회 8,264 댓글 0본문
--------------- CSS ----------------
#mask {
position:absolute;
z-index:9000;
background-color:#000;
display:none;
left:0;
top:0;
}
.window{
display: none;
position:absolute;
left:100px;
top:100px;
z-index:10000;
}
------------- JS ---------------
function wrapWindowByMask(){
var maskHeight = $(document).height();
var maskWidth = $(window).width();
alert(maskHeight);
$('#mask').css({'width':maskWidth,'height':maskHeight});
$('#mask').fadeIn(1000);
$('#mask').fadeTo("slow",0.8);
$('.window').show();
}
$(document).ready(function(){
$('.openMask').click(function(e){
e.preventDefault();
wrapWindowByMask();
});
$('.window .close').click(function (e) {
e.preventDefault();
$('#mask, .window').hide();
});
$('#mask').click(function () {
$(this).hide();
$('.window').hide();
});
});
관련링크
댓글목록 0
등록된 댓글이 없습니다.
