Skip to content

Instantly share code, notes, and snippets.

@vfontjr

vfontjr/load_script1.php

Last active Feb 20, 2021
Embed
What would you like to do?
formidable_masterminds_numeral_demo
<?php
wp_enqueue_scripts( 'numeral-script', get_stylesheet_directory_uri() . '/js/numeral.min.js', array( '' ), '1.0.0', true );
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
<script>
jQuery(document).ready(function ($) {
"use strict";
$('#field_oqrnm').on("change", function() {
var raw_value = $(this).val(),
formatted_value = numeral(raw_value).format('$0,0.00');
$(this).val(formatted_value);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment