Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Created May 22, 2019 16:04
Show Gist options
  • Select an option

  • Save carmoreira/69ee215321e5d449337d4e109b7db238 to your computer and use it in GitHub Desktop.

Select an option

Save carmoreira/69ee215321e5d449337d4e109b7db238 to your computer and use it in GitHub Desktop.
slow redirect for Advisor Quiz results
// 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