사용자함수 배경화면 전체 Dimmed 처리 함수
페이지 정보

본문
--------------- 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();
});
});
관련링크
- 이전글제이쿼리를 이용한 쿠키사용 15.05.15
- 다음글생성자 함수: 슬라이딩과 페이딩효과로 롤링되는 상품배너들 15.05.15
댓글목록
등록된 댓글이 없습니다.

