I have an asp.net web application. When I click on my button a modal should be opened this is my button:
<input type="button" class="mybutton" data-toggle="modal" data-target="#mymodal" value="Open Model" />
This works fine but I would prefer to to it like that:
<input type="button" class="mybutton" onclick="showModal()" value="Open Model" />
with:
function showModal() {
$('#mymodal').toggle();
}
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.