티스토리 뷰
<script type="text/javascript">
jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop()) + "px");
this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + $(window).scrollLeft()) + "px");
return this;
}
function open(layerId){
$("#"+layerId).show();
$("#"+layerId).center();//fn
}
'Development' 카테고리의 다른 글
| [Java] 랜덤 문자열 (Random String) 만들기 (0) | 2015.07.22 |
|---|---|
| [Cpp] error C4996: 'inet_addr' 오류 (5) | 2015.07.06 |
| [Cpp] dos command (0) | 2015.04.01 |
| [IOS] 유니티 IOS 빌드 후 용량 대폭증가 이슈 (0) | 2015.03.18 |
| [SpringMybatis] multiple recordsets (DB의 여러결과셋 받기) (3) | 2015.02.09 |
댓글
최근에 올라온 글
글 보관함
- Total
- Today
- Yesterday