Stop media from playing when div is toggled to hidden
<p>I'm using javascript to toggle the visibility of a div, which is working fine. The problem is that the div contains an audio player / youtube player. If the media is playing and the div is toggled to hidden, the media continues to play. Is there a way to resolve this?</p>
