Commit 1850d71e authored by Martin Schoeler's avatar Martin Schoeler

add autoplay to video

parent 4f80f3c9
......@@ -91,7 +91,7 @@ redirect_from:
</div>
<div class="col--third">
<a href="#" data-featherlight="#youtube-link">Open element in lightbox</a>
<a class="youtube-image-link" href="" data-featherlight="#youtube-link">Open element in lightbox</a>
<div id="youtube-link"><iframe class="youtube-video"src="https://www.youtube.com/embed/IzJ11kvM-P8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>
</div>
</div>
......
......@@ -395,3 +395,8 @@ $('.switch').on('click', function () {
$('.self-managed__container').css("display","block");
}
})
$('.youtube-image-link').on('click', function (e) {
$(".featherlight.featherlight-iframe .youtube-video")[0].src += "?autoplay=1";
})
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment