Created
May 22, 2019 16:04
-
-
Save carmoreira/69ee215321e5d449337d4e109b7db238 to your computer and use it in GitHub Desktop.
slow redirect for Advisor Quiz results
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
| // slow redirect | |
| jQuery('.advq_profile_box').each(function() { | |
| var redirect = jQuery(this).attr('data-redirect'); | |
| jQuery(this).attr('data-slow-redirect', redirect); | |
| jQuery(this).attr('data-redirect', ''); | |
| }); | |
| jQuery('.advq_checkanswers .advq_button').on('click', function() { | |
| setTimeout(function() { | |
| jQuery('.advq_profile_box').each(function() { | |
| if (jQuery(this).is(":visible")) { | |
| var redirect = jQuery(this).attr('data-slow-redirect'); | |
| if (redirect != '') { | |
| window.location = redirect; | |
| } | |
| } | |
| }); | |
| }, 5000); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment