i wonder what i\'m doing wrong?
$(\'.player_audio\').click(function() {
if ($(\'.player_audio\').paused == false) {
$(\'.player_audio\').paus
if anyone else has problem with the above mentioned solutions, I ended up just going for the event:
$("#jquery_audioPlayer").jPlayer({
ready:function () {
$(this).jPlayer("setMedia", {
mp3:"media/song.mp3"
})
...
pause: function () {
$('#yoursoundcontrol').click(function () {
$("#jquery_audioPlayer").jPlayer('play');
})
},
play: function () {
$('#yoursoundcontrol').click(function () {
$("#jquery_audioPlayer").jPlayer('pause');
})}
});
works for me.
Simple Add this Code
var status = "play"; // Declare global variable
if (status == 'pause') {
status='play';
} else {
status = 'pause';
}
$("#audio").trigger(status);
I did it inside of a jQuery accordion.
$(function() {
/*video controls*/
$("#player_video").click(function() {
if (this.paused == false) {
this.pause();
}
});
/*end video controls*/
var stop = false;
$("#accordion h3").click(function(event) {
if (stop) {
event.stopImmediatePropagation();
event.preventDefault();
stop = false;
}
$("#player_video").click();
});
});