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
try ( in jQuery < 1.9 )
$("input[type='button']").toggle( function(){ $(this).val("Pause"); }, function(){ $(this).val("Play"); } );
Note: The toggle event was deprecated in 1.8 and removed in 1.9
toggle