title: Open Bootstrap Model with own function
body: <p>I have an asp.net web application.
  When I click on my button a modal should be opened this is my button:</p>
  
  <pre><code>&lt;input type="button" class="mybutton" data-toggle="modal"     data-target="#mymodal" value="Open Model" /&gt; 
  </code></pre>
  
  <p>This works fine but I would prefer to to it like that:</p>
  
  <pre><code>&lt;input type="button" class="mybutton" onclick="showModal()" value="Open Model" /&gt; 
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>function showModal() {
        $('#mymodal').toggle();
    }
  </code></pre>
  
  <p>but when I do it that way and click on the button the modal doesn´t show up and it is like the whole page freezes. But I don´t get any error warnings.
  If anyone has an idea I would really appriciate.</p>