- Fixed compatibility with jQuery 3.x and 'load' event

This commit is contained in:
nikitasinelnikov
2020-06-02 14:25:45 +03:00
parent 1be9e0c24f
commit cab5545d20
4 changed files with 171 additions and 170 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ add_action( 'wp_head', 'um_add_form_honeypot_css' );
function um_add_form_honeypot_js() {
?>
<script type="text/javascript">
jQuery(window).load(function() {
jQuery( window ).on( 'load', function() {
jQuery("input[name='<?php echo esc_js( UM()->honeypot ); ?>']").val('');
});
</script>