Last active
March 31, 2021 13:59
-
-
Save dragipostolovski/54f61950c85783e6714607cca817ba82 to your computer and use it in GitHub Desktop.
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
<?php | |
// Wrap two adjacent elements in a containing div using jQuery. | |
function pe_load_js() { | |
?> | |
<script type='text/javascript'> | |
jQuery(document).ready(function ($) { | |
$("#billing_customer_age_field span input").each(function(index) { | |
$(this).next("label").andSelf().wrapAll("<div class='efp-form-element-wrapper' />") | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'pe_load_js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment