title: pass value to popup window [javascript]
body: <p>Have problem with passing value to modal pop up. </p>
  
  <p>This is link to modal edit. </p>
  
  <pre><code> &lt;a href=\"#edit\" data-toggle=\"modal\"&gt;
        &lt;button class=\"btn btn-primary image-id-btn\" data-image=$id&gt;edit&lt;/button&gt;&lt;/a&gt;
  </code></pre>
  
  <p>here is code for modal pop up it works fine</p>
  
  <pre><code>&lt;!-- MODAL START --&gt;
  &lt;div id="edit" class="modal fade"&gt;
  &lt;div class="modal-dialog"&gt;
  &lt;div class="modal-content"&gt;
  &lt;div class="modal-header"&gt;
  &lt;h4 class="modal-title"&gt;edit content&lt;/h4&gt;
  &lt;/div&gt;
  &lt;div class="modal-body"&gt;
  &lt;&lt;form id="modal-form" accept-charset="UTF-8" method="POST" action="edited.php" data-remote="true" &gt;
  &lt;fieldset&gt;  
  &lt;div class="image-id-holder"&gt;
  &lt;input type="text" value=imageID /&gt;
  &lt;/div&gt;
  &lt;/fieldset&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
  &lt;input id="modal-form-submit" type="submit" name="submit" class="btn btn-primary" href"#" value="edit"/&gt;
  &lt;button class="btn btn-danger"  data-dismiss="modal"&gt;close&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;!-- MODAL END --&gt;
  </code></pre>
  
  <p>My javascript code : </p>
  
  <pre><code>&lt;script&gt;
          $(".image-id-btn").on("click", function(){
              var imageId = $(this).attr("data-image");
              $(".image-id-holder").children("input").val(imageId);
          });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is, i can not pass the $id to pop up window, to edit content i am trying to.</p>
  
  <p>thanks for help in advance</p>