In the below code when the play button is clicked Its value should be changed to pause and when pause is clicked the other function should be called .How to do this using jq
A simplest idea can be this
function play(action) { { if(action=='play') { play_int(); $("#btn_play").val('pause'); } else { pause_int(); $("#btn_play").val('play'); } } $("#btn_play").click(function() { val = $(this).val(); play(val); }