js code to close a modal when clicked code example
Example: javascript modal close
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});