모

불당님 및 Jquery 관심있으신분 도움 요청해요 ^^;

· 2009-02-12 (목) 10:16:29 · 2713 · 1
<html>
<head>

  <link type="text/css" rel="stylesheet" href="http://ui.jquery.com/testing/themes/base/ui.all.css" />
  <script type="text/javascript" src="http://ui.jquery.com/testing/jquery-1.3.1.js"></script>
  <script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.core.js"></script>
  <script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.draggable.js"></script>
  <script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.resizable.js"></script>
  <script type="text/javascript" src="http://ui.jquery.com/testing/ui/ui.dialog.js"></script>

<script>

$(document).ready(function(){
      $('#dialog').hide();
 });


function addNumbers() {
    
    $("#dialog").dialog({

        autoOpen: true,
        bgiframe: true,
        draggable:true,
        modal: true
            
    });
    
}


  </script>
</head>

<body>
 
    <div id="dialog" title="Dialog Title">I'm in a dialog</div>
    <input type="button" onclick="addNumbers();" value="Dialog Test" />


</body>
</html>

위이 소스로 모달창을 표현을 해보고 있는데.
버튼을 클릭했을시 모달창이 뜨긴 하는데 한번만 뜨고 마네요

Jquery 사이트에서 다이얼로그 옵션을 보는데 계속해서 뜨게 하는 옵션이 뭔지 모르겠네요
http://docs.jquery.com/UI/Dialog

|

댓글 1개

2009-02-12 (목) 10:51:46
<div id="dialog" title="Dialog Title">I'm in a dialog</div>

위 엘리먼트도 동적으로 생성하셔야 할듯..

div는 하나인데.. 여러번 호출한다고 여러개 생성되진 않을듯 합니다.
전 jquery를 안해봐서 되는 방법이 있을진 모르겠습니다 ㅋㅋ
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

203,076건
+
제목 글쓴이 날짜 조회
09-02-12 조회 1,482
09-02-12 조회 1,255
09-02-12 조회 1,279
09-02-12 조회 1,322
09-02-12 조회 1,278
09-02-12 조회 1,261
09-02-12 조회 1,306
09-02-12 조회 1,175
09-02-12 조회 1,593
09-02-12 조회 1,251
09-02-12 조회 1,286
09-02-12 조회 1,530
09-02-12 조회 1,489
09-02-12 조회 1,464
09-02-12 조회 1,296
09-02-12 조회 1,289
09-02-12 조회 1,410
09-02-12 조회 1,447
09-02-12 조회 2,714
09-02-12 조회 1,296