php - Calling a jquery dialog box in a div loop
<p>How do i call a jquery dialog box from a div in a loop?</p>

<p>See for instance, clicking the <code>&lt;p&gt;</code> will show up the profile of selected database user. </p>

<p>Ex:</p>

<pre><code>&lt;div id="db-users"&gt;

   &lt;div id="user-info1"&gt; //db userinfo 1
     &lt;p&gt;ID#001 John Smith&lt;/p&gt;
     &lt;div id="dialog-box"&gt;Profile of John Smith&lt;/div&gt;
   &lt;/div&gt;

   &lt;div id="user-info2"&gt; //db userinfo 2
      &lt;p&gt;ID#002 John Doe&lt;/p&gt;
      &lt;div id="dialog-box"&gt;Profile of John Doe&lt;/div&gt;
   &lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>EDIT: By the way , here is what i have done so far</p>

<pre><code>$('p').click(function() {
        $('#dialog-box').dialog({

       modal: true,
       width:560,
       height: 500,
       draggable: false,
       buttons: {
        Close: function() {
              $( this ).dialog( "close" );
        }
       }
    });
});
</code></pre>

<p>Only one dialog box is showing up, only for John Smith. I don't have the idea to come up the desired output. Any help would much appreciated. Thanks.</p>

<p>EDIT 2: I added IDs to all div, to identify each div. Now, using jquery, how to implement q dialog box to show up the info when Name is clicked?</p>
