close modal with pure js code example Example: javascript modal close $('#closemodal').click(function() { $('#modalwindow').modal('hide'); });