javascript - JQuery Youtube Embed On Click CSS -
i want change css of element when onclick iframe when play video css change , when pause video css return. know jquery , tried not worked.
following code:
$(".video-post").on("click", function() { $(".video-post element").css("display", "none"); });
html:
<div class="post-media video-post embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/a5mm6vovmk4" allowfullscreen></iframe> <time datetime="2017">july 21, 2017</time> </div>
$(".video-post").click(function () { $(this).hide(); });
Comments
Post a Comment