change button on click jquery code example
Example 1: how to click button programmatically in jquery
$('#your_link_id').click()
Example 2: jquery change button click function
$("#click-button").on('click', firstClick)
function firstClick() {
alert("First Clicked");
$("#click-button").off('click').on('click', secondClick)
}
function secondClick() {
alert("Second Clicked");
$("#click-button").off('click').on('click', firstClick)
}