title: Showing a modal When onclick method is called of <a>
body: <p>i am using a salesforce platofrm.in which i have access to only onclick function of a button .i have to launch a modal like this code</p>
  
  <pre><code>&lt;!-- Button to trigger modal --&gt;
  &lt;a href="#myModal" role="button" class="btn" data-toggle="modal"&gt;Launch demo modal&lt;/a&gt;
  
  &lt;!-- Modal --&gt;
  &lt;div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
      &lt;h3 id="myModalLabel"&gt;Modal header&lt;/h3&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 class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
      &lt;button class="btn btn-primary"&gt;Save changes&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>instead of setting these attributes <code>href="#myModal" role="button" class="btn" data-toggle="modal</code></p>
  
  <p>how to show modal when user click on the link using onclick function of javascript please guideline</p>