title: How can you pull data through on bootstrap buttons to modals?
body: <p>I was having a hard time figuring out how to make this work.  This should work from some examples I have seen.  It does do an alert when the modal pops up, so what am I missing?</p>
  
  <p><a href="http://www.bootply.com/Hveakq42Vd" rel="nofollow">http://www.bootply.com/Hveakq42Vd</a></p>
  
  <pre><code>&lt;a href="#" data-mylink="1" data-mylink2="2" data-mylink3="3" class="btn btn-success" role="button" data-toggle="modal" data-target="#modalmain"&gt;Print&lt;/a&gt;                                                  
  
  &lt;!-- modal pop up for [F] button --&gt;
  &lt;div class="modal fade" tabindex="-1" role="dialog" id="modalmain"&gt;
    &lt;div class="modal-dialog" role="document"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;×&lt;/span&gt;&lt;/button&gt;
          &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          &lt;p&gt;One fine body…&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;&lt;!-- /.modal-content --&gt;
    &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  &lt;/div&gt;&lt;!-- /.modal --&gt;
  </code></pre>
  
  <p>JQuery:</p>
  
  <pre><code>$('#modalmain').on('shown.bs.modal', function (e) {
      var btn = $(e.relatedTarget);
      var auditID = btn.data("data-mylink");
      var audittype = btn.data("data-mylink2");
      var auditinstanceID = btn.data("data-mylink3");
  
      alert(auditID + " : "+audittype+ " : " + auditinstanceID);
  });
  </code></pre>