Last active
November 23, 2017 11:20
-
-
Save kary4/7c58fd5f4457442b943f8c7a3346008f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
jQuery( document ).ready(function() { | |
jQuery('.et_pb_audio_cover_art').each(function(){ | |
let thisAudio = jQuery(this).parent().find('audio').get(0); | |
jQuery(this).click(function(){ | |
if (thisAudio.paused) { | |
thisAudio.play(); | |
} else { | |
thisAudio.pause(); | |
} | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment