i wonder what i\'m doing wrong?
$(\'.player_audio\').click(function() {
if ($(\'.player_audio\').paused == false) {
$(\'.player_audio\').paus
I'm not sure why, but I needed to use the old skool document.getElementById();
play sound
and the JS:
$(document).ready(function() {
var playing = false;
$('a#button').click(function() {
$(this).toggleClass("down");
if (playing == false) {
document.getElementById('player').play();
playing = true;
$(this).text("stop sound");
} else {
document.getElementById('player').pause();
playing = false;
$(this).text("restart sound");
}
});
});
Check out an example: http://jsfiddle.net/HY9ns/1/