Created
December 6, 2017 17:45
-
-
Save sewmyheadon/3efe633ccf1589f2f6374de318b002c8 to your computer and use it in GitHub Desktop.
When a required field is missing upon checkout, this uses jQuery to scroll to the top.
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
/** | |
* Jump to error in EE checkout | |
*/ | |
function ee_test_click_event_handler(){ | |
wp_add_inline_script( | |
'ee_form_section_validation', | |
'jQuery( "#spco-go-to-step-finalize_registration-submit" ).click(function( event ) { | |
alert( "Handler for .click() called." ); | |
});' | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'ee_test_click_event_handler', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment