Created
September 17, 2024 11:03
-
-
Save xlplugins/cb6a7245d9a768d0528f63c891dcbf0e to your computer and use it in GitHub Desktop.
Add script on second step of checkout
This file contains 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
<script> | |
jQuery(document).ready(function($) { | |
$(document.body).on('wfacp_step_switching', function(e, v) { | |
console.log(e, v); // This will log the event and the step object | |
if (v.current_step === 'two_step') { | |
// Your custom jQuery code for the second step goes here | |
console.log("User has reached the second step!"); | |
// Example: Change the background color of the body | |
$('body').css('background-color', '#000000'); | |
// Add more of your custom jQuery code as needed | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment