I am trying to hide the video element using javascript by using [videoclass].style.display = "none"; but it is not working.
HTML:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<video class="dntshow" width="444" height="250" controls>
<source src="" id="video_here">
Your browser can not play this video.
</video>
CSS:
.dntshow{
display: block;
z-index: 999;
margin: 0 auto;
}
JS:
var doshow = document.getElementsByClassName("dntshow");
doshow.style.display = "none";
What am I doing wrong?