Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #change #button #click #function
ADD COMMENT
Topic
Name
9+6 =