What is the jQuery method to detect when audio has stopped playing?
<p>I want to toggle a function when the audio is done being played.</p>

<p>Here's the code I tried(without luck):</p>

<pre><code>$(function(){
  if ($('#audio').get(0).stopped == true) {
  $('div#switch').toggle(); 
  } 
});
</code></pre>
