Monday, 9 September 2013

How to access native method with jQuery a selector?

How to access native method with jQuery a selector?

I have the following :
<audio src="blah.mp3" id="player" controls></audio>
document.getElementById('player').play(); works.
$('audio#player').play(); don't.
Why ? Can't I access native methods with a jQuery selector ?

No comments:

Post a Comment