모

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

· 2009-02-12 (목) 10:16:29 · 2714 · 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,079건
+
제목 글쓴이 날짜 조회
09-02-12 조회 1,447
09-02-12 조회 2,715
09-02-12 조회 1,296
09-02-12 조회 1,327
09-02-12 조회 3,191
09-02-11 조회 1,292
09-02-11 조회 1,233
09-02-11 조회 1,185
09-02-11 조회 1,338
09-02-11 조회 1,222
09-02-11 조회 1,331
09-02-11 조회 1,882
09-02-11 조회 1,837
09-02-11 조회 1,259
09-02-11 조회 1,344
09-02-11 조회 1,914
09-02-11 조회 2,311
09-02-11 조회 1,137
09-02-11 조회 1,326
09-02-11 조회 1,250