title: is it possible to define an mp3 and ogg file for jquery click sound?
body: <p>i have this solution working in chrome:</p>
  
  <p><a href="https://stackoverflow.com/questions/8489710/how-can-i-play-sound-in-jquery-when-click-a-button">Play an audio file using jQuery when a button is clicked</a></p>
  
  <p>but firebug console says:</p>
  
  <p><code>HTTP "Content-Type" of "audio/mpeg" is not supported. Load of media resource http://path/to/sound.mp3 failed.</code></p>
  
  <p>is there a way to define both an ogg and mp3 file in this script (assuming this would enable the sound to play in firefox):</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
  var audioElement = document.createElement('audio');
  audioElement.setAttribute('src', 'http://path.com/to/sound.mp3');
  $('#play_it').click(function() {
  audioElement.play();
  });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>thank you.  </p>
  
  <p><strong>update</strong></p>
  
  <p>i tried just adding another reference to the file below the mp3 reference and it worked, not sure if this is the best solution though:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
  var audioElement = document.createElement('audio');
  audioElement.setAttribute('src', 'http://path.com/to/sound.mp3');
  audioElement.setAttribute('src', 'http://path.com/to/sound.ogg');
  $('#play_it').click(function() {
  audioElement.play();
  });
  });
  &lt;/script&gt;
  </code></pre>