Jquery Dialog Box

Rocking
Rocking used Ask the Experts™
on
hi,

is there any common code for creating multiple dialog box having different dynamic contents and their position is fixed on the page with each one coming below other ?


<head>
  <meta charset="utf-8">
  <title>dialog demo</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="js/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
</head>
<body>
 
<button id="opener">open the dialog</button>
<div style="margin-left: 200px;margin-top: 200px;border: solid 5px red;">
<div id="dialog" title="Dialog Title"> a dialog</div>
</div>

 
<script>
$( "#dialog" ).dialog({ autoOpen: true });

</script>
</body>
</html>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
test page : http://jsfiddle.net/7jqat

<button id="opener">open the dialog</button>
<div style="margin-left: 200px;margin-top: 200px;border: solid 5px red;">
    <div id="dialog1" title="Dialog Title"> a dialog</div>
</div>
<div style="margin-left: 200px;margin-top: 200px;border: solid 5px red;">
    <div id="dialog2" title="Dialog Title"> a dialog 2</div>
</div>
<div style="margin-left: 200px;margin-top: 200px;border: solid 5px red;">
    <div id="dialog3" title="Dialog Title"> a dialog                 3</div>
</div>

 
<script>
$( "#dialog1" ).dialog({ autoOpen: true, modal: true });
$( "#dialog2" ).dialog({ autoOpen: true, modal: true });
$( "#dialog3" ).dialog({ autoOpen: true, modal: true });
</script>

Open in new window

Author

Commented:
I want the code the dialog to open within the div,we create the three div below each other
div1
div2
div3

and three dialog should come under each
div1 having dilaog1
div2 having dialog2
div3 having dialog3

the three dialog should be enabled,so that i can drag and drop.
leakim971Multitechnician
Top Expert 2014

Commented:
what is the issue doing that?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial