리자

ajax modal window (ajax 모달창)

· 16년 전 · 5333

/*********************************************************************************
* dialog
**********************************************************************************/
function openBox(width, height, border, goURL , modal){
 if($(window.document).find('#dialog').size() <= 0){
  var html = "<div id='dialog' style='width:"+width+"px;height:'"+height+"px';margin:0px 0px;>"
     + "<iframe id='myiframe' name='myiframe' scrolling='no' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' width='95%' height='98%'></iframe>"
     + "</div>";
   
  $("body").append(html);
 }
 
 $('#myiframe').attr('src', goURL);
 
 jQuery("#dialog").dialog({
            modal: false,
            autoOpen: false,
            width: width + 10,
            height : height,
            dialogClass: "openBoxCss",
            overlay: {opacity: 0.5, background: "black"}
    });
    jQuery("#dialog").dialog({autoOpen: false});
 jQuery("#dialog").dialog("open");
 $("#dialog").dialog({
  open:function() {
   $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove();
    }
 });
 
    return false;
}

function closeBox(){
 var d = $(window.document).find('#dialog');
 d.dialog( "close" );
 d.dialog( "destroy" );
 d.remove();
 0
}

[출처] AJAX 모달창 |작성자 super_style

[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
16년 전 조회 2,418
16년 전 조회 2,662
16년 전 조회 2,149
16년 전 조회 5,494
16년 전 조회 3,347
16년 전 조회 1,341
16년 전 조회 1,682
16년 전 조회 5,039
16년 전 조회 2,290
16년 전 조회 3,392
16년 전 조회 2,631
16년 전 조회 1,551
16년 전 조회 5,334
16년 전 조회 2,459
16년 전 조회 5,908
16년 전 조회 1,924
16년 전 조회 3,985
16년 전 조회 1,917
16년 전 조회 3,012
16년 전 조회 2,194
16년 전 조회 2,223
16년 전 조회 4,404
16년 전 조회 3,278
16년 전 조회 2,804
16년 전 조회 2,952
🐛 버그신고