Created
August 23, 2018 22:35
-
-
Save NickDeckerDevs/dba561e73b72e038e86b1c8ea58751aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // window load waits until after CTAs and forms are in DOM | |
| $(window).load(function() { | |
| // check to see if this exists on the page by checking out how many exist | |
| if($('.post-footer-cta-wrapper #cta_button_112139_572acb38-75c4-4b31-ba14-d52e28378911').length > 0) { | |
| //set up click event handler | |
| $('.post-footer-cta-wrapper #cta_button_112139_572acb38-75c4-4b31-ba14-d52e28378911').on('click', function() { | |
| // after being clicked we return false, preventing the default behavior of the element. | |
| // in this case it is a link, so it prevents the link from functioning | |
| return false; | |
| }); | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment