i would like to hide a div after a video has reached a certain time. The following code is what I thought would in theory work but is not currently. Any solution would be appreciated!
<body>
<video id="vid" src="somevideo.mp4"></video>
<div id="box"></div>
<script>
function hideDiv() {
if (vid.currentTime > 5) {
document.getElementById('box').style.display = 'none';
}}
</script>
</body>