Play and stop music in HTML using jPlayer

In this article, I had explained how to play and stop mp3 music using player. I used three javascript files two (jquery.jplayer.min.js, jquery.min.js) for jplayer and one (code.js) contains javascript code to play or stop the music.

Play music in HTML using jPlayer

Jplayer is free open source media library written in javascript. Using jplayer we can play mp3 music and stop the music.

In this article, I had explained how to play and stop mp3 music using player. I used three javascript files two (jquery.jplayer.min.js, jquery.min.js) for jplayer and one (code.js) contains javascript code to play or stop the music.

Sample.html file contains the following code.

Here I am given reference to two external javascirpt files jquery.jplayer.min.js, code.js. I used to two html button control to play and stop the music which have onclick event which raises play and stop function of code.js. Here div tag jquery_jplayer_1 is used by the jplayer to play or stop the mp3 song.