Link click callback

Instapage allows running javascript code just after anchor or button click. 

1. Any link click on the page

Use the following snippet if you want your code executed upon any button click on the page, regardless of element ID. 

NOTE: The "instapageAnchorClick" function can only be present on the page once, regardless of how many buttons you have or how many actions you want to trigger after the click. If you have multiple snippets that need to fire upon the click, you must add all of them under the same Link click Callback function. If the snippets are not added under the same Link click Callback script, only the last function in the source code will be triggered.

2. A click on a particular element

Use the following snippet if you want your code to be executed upon clicking a specific element, targeted by its unique ID.

Here you will need to replace "123" with the actual ID of your element. You will need to right-click on the button and select Edit CSS, as seen in the GIF below:

editcssnew.gif