Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickfreitasdev/0e90151bfce42107d574e1f5319ff148 to your computer and use it in GitHub Desktop.
Save patrickfreitasdev/0e90151bfce42107d574e1f5319ff148 to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_footer', function(){ ?>
<script>
(function ($) {
$(function () {
var cvalinput = $('.custom-uppercase input');
$(cvalinput).bind('focusout keyup ', function () {
if ($(this).val() !== '') {
$(this).val( $(this).val().toUpperCase() );
}
});
});
})(window.jQuery);
</script>
<?php }, 999); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment