I have the following modal box:
<div class="modal-video" id="v-5417">
<div class="video-player">
<video id="v-5417-tape" preload="none">
<source type="video/mp4" src="videos/anthem-od47.mp4">
<source type="video/webm" src="videos/anthem-od47.webm">
</video>
<div class="close-modal fade-control"></div>
</div>
</div>
and trying to use the following e.keyCode to close the modal:
$(document).keydown(function (e) {
if (e.keyCode == 27) {
$(".modal-video").hide();
}
});
This is only hiding the video, but not closing the modal and killing the video. How can I completely close the modal and video together?