And again this code:
audioElement.addEventListener('ended', function() {
$('span#pause').fadeOut('slow');
$('span#play').delay(1500).fadeIn('slow');
});
As far as I know “addEventListener” should be “bind” but somehow when I simply change it the whole script (there’s more than these lines) doesn’t work anymore…
addEventListeneris a method of the DOM element.fadeOut,fadeInanddelayare jQuery methods.If you want to use the bind method, you need a jQuery object, so it would be like