title: How can I pass data to a Bootstrap modal when calling via javascript?
body: <p>I know how to pass data to a Bootstrap modal when using a button, using data attributes, thus I can eg pass a <strong>context</strong> of 'OPS' via a data-context attribute as:</p>
  
  <pre><code>&lt;button id="xx" class="btn" type="button" data-toggle="modal" data-target="#xx" data-context="OPS"&gt;xx&lt;/button&gt;
  </code></pre>
  
  <p>How do I do this if I open the modal via JavaScript, thus:</p>
  
  <pre><code>$('#myModal').modal();
  </code></pre>
  
  <p>I have tried various ways of providing parameters, but unsuccessfully.</p>