html5 audio player – jquery toggle click play/pause?

You can call native methods trough trigger in jQuery. Just do this:

$('.play').trigger("play");

And the same for pause: $('.play').trigger("pause");

EDIT: as F… pointed out in the comments, you can do something similar to access properties: $('.play').prop("paused");

Leave a Comment