title: Playing sound inside javascript event
body: <p>I have an event where I need to play a mp3/wav sound every time a certain condition is verified. 
  Is there a way to play it cross-browser, also even if I open android browser on a tablet?</p>
  
  <p>Actually I am using a javascript plugin called ionSound but looks like it doesn't work under android's tabled..</p>
  
  <p>Like:</p>
  
  <pre><code>jQuery.ajax({
      type: "GET",
      dataType: "json",
      url: "./getData.php?idx="+id,
      success: function(data) {
          if (data.length &gt; 0) {
              // alert('Gotta play sound...');
              dataFound = true;
              $.ionSound({
                  sounds: [ "woop_woop" ],
                  path: "../../images/"
              });
  
              $.ionSound.play("woop_woop");
              // alert('Played sound right now...');
          } else {
              dataFound = false;
          }
      }
  });
  </code></pre>
  
  <p>Thanks in advance to all!</p>
  
  <p>Cheers,
  Luigi</p>
  
  <hr>
  
  <p>I'm picking back this question again... I figured out on some platforms it doesn't really play sound... for example on another desktop PC with Chrome it doesn't play audio, neither on another tablet...I think it's due of browser's version... so is there a pure javascript way to just play an audio like a little mp3 or wav from code?..</p>
  
  <p>Thanks in advance!
  Cheers
  Luigi</p>