I need to hide the 'div .blind' element when a YouTube video (inside 'div #player') is clicked. How can I achieve this?
Here's an example:
JS:
...
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
videoId: 'Lo3rrP8u7Mw',
playerVars: {
'wmode': 'transparent',
'color': 'white',
'modestbranding': 1,
'showinfo': 1
},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
...
CSS:
.video .blind {
display: block;
width: 300px;
height: 300px;
background-color: black;
}
HTML:
<div class="video">
<div id="player" ></div>
<div class="blind" id="blind"></div>
</div>
<div class="video">
<div id="player2" ></div>
<div class="blind" id="blind"></div>
</div>