<a href="#page" class="lil-close">Close</a>
I have this button to close a lightbox. The lightbox contains a YouTube video and when I close the lightbox YouTube video keeps playing, I assume this will happen with all videos (not only YouTube). Is there a way (jQuery/JavaScript) to pause video once a user clicks a button?
Try this function which uses YouTube’s API and YouTube’s Chromeless Player:
See an example here