I have a external link inside my modal, and I want the modal to hide after the user has clicked on the link. How do I do that?
Here is my code:
You need to bind the modal hide call to the onclick
event.
Assuming you are using jQuery you can do that with:
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});
Also make sure the click event is bound after the document has finished loading:
$(function() {
// Place the above code inside this block
});
enter code here