For Example Write this Input type in your code
<input type="button" id="marqbt" value="Play"/>
Add this script in your script file or header or footer file
<script>
$(function(){$('#marqbt').click(function() {
$(this).val() == "play" ? play_int() : play_pause();
});
});
function play_int() {
$('#marqbt').val("pause");
// do play
}
function play_pause() {
$('#marqbt').val("play");
// do pause
}
</script>
Now you can change button value when you click on this
Comments
Post a Comment