title: How to create a dialog within page with jquery mobile?
body: <p>Here is my code. I build 20 questions dynamically. So I need to create a dialog for each of them. It's a mobile application, built using jquery mobile. So I prefer to use the jquery mobile dialog functionality.</p>
  
  <p>I know for sure it can be done, just not sure how.</p>
  
  <pre><code>&lt;div data-role="page" id="Survey"&gt;
  
  &lt;div class="quest"&gt;
     @Html.DisplayFor(modelItem =&gt; item.Text)&lt;div class="quest_com"&gt;
     &lt;a href="#dialog-@Html.DisplayFor(modelItem =&gt; item.Id)" data-rel="dialog" data-transition="flip"&gt;Comments&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;div data-role="page" id="dialog"&gt;
              &lt;div data-role="header"&gt;
                  &lt;h1&gt;
                      Dialog&lt;/h1&gt;
              &lt;/div&gt;
              &lt;div data-role="content"&gt;
                  &lt;div class="center-wrap"&gt;
                      &lt;textarea style="width: 320px" title="Comments"&gt;
  
              &lt;/textarea&gt;&lt;a data-rel="dialog" data-role="button"&gt;Save&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>