jQuery(document).ready(function($){ var audio = document.getElementById('audio123'); $(".audio-play").on("click", function() { audio.addEventListener('canplaythrough', function(){ alert('loaded') }) audio.play(); }) })