jQuery jPlayer - How to stop all players before playing a new one?

Mr_Nizzle picture Mr_Nizzle · May 4, 2010 · Viewed 9.2k times · Source

I need to stop all other instances of jPlayer before playing a new one when i click play.

Thanks for you help.

Answer

Mr_Nizzle picture Mr_Nizzle · May 4, 2010

SOLVED

just assigned onclick function to the play trigger and the functions does:


function stopall(){
    $(".jplyrselectr").jPlayer("stop");
}