.play()
is a method of the HTMLAudioElement object not the jQuery object, jQuery wrapper doesn't do anything here, as you are passing retuned value of the .play()
method to it, you can select the element(s) using jQuery, gets DOM element object(s) from the collection and call the .play()
method on it:
$('audio.aaa').get(0).play(); // works for the first matched element in the collection
If there are several elements, you can iterate through the collection using .each()
method:
$('audio.aaa').each(function() {
// `this` keyword here refers the HTMLAudioElements
this.foo();
});