Opening a modal per button click ? I'm doing something wrong...
Hi I am supposed to open a modal (the content is already there) which has the id "reservemodal" with a "Reserve Table" button using javascript and bootstrap - but how I don't get it.
This is where the button is:
<div class="col-12 col-sm align-self-center">
<a role="button"
class="btn btn-block btn-sm nav-link btn-warning"
href="" onclick="openModal()"
>Reserve Table
</a>
</div>
And this is the bit of javascript code that I included into my scripts.js file, I have tried including it inside the $(document).ready(function()) as well as outside of it:
function openModal(){
$('#reservemodal').modal('show');
}
So the problem is that simply nothing happens after clicking the "Reserve Table" button.
Posted Oct 28, 2017, 8:48 AM UTC
42