I have a div with display: none and this div has an audio, but if I use autoplay, even if the div is hidden, the audio stays playing, I would like it to play the audio only when the div is appearing. Can you help me?
<div class="fig1"></div>
.fig1{display:none}
.evnt1{display:block}
<script>$('.fig1').click(function(){
$('.fig1').show('slow');});
</script>