I am trying to auto-format an input field with ID amount-unsecured
to format the input as a local currency.
I am using the Mask Money jQuery plugin.
I’ve included the below scripts in the tag of the page:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="jquery.maskMoney.js" type="text/javascript"></script>
I’ve change the ID of the input field to match on webflow what is in the custom code.
I’ve then tried embedding the js script below in the “before footer” custom code section, as well as in an embed directly below the actual input field. No luck in getting it to work.
<script type="text/javascript">
$("#amount-unsecured").maskMoney({
// The symbol to be displayed before the value entered by the user
prefix:'R ',
// The suffix to be displayed after the value entered by the user(example: "1234.23 €").
suffix: "",
// Delay formatting of text field until focus leaves the field
formatOnBlur: false,
// Prevent users from inputing zero
allowZero:false,
// Prevent users from inputing negative values
allowNegative:true,
// Allow empty input values, so that when you delete the number it doesn't reset to 0.00.
allowEmpty: true,
// Select text in the input on double click
doubleClickSelection: true,
// Select all text in the input when the element fires the focus event.
selectAllOnFocus: false,
// The thousands separator
thousands: ' ',
// The decimal separator
decimal: '.' ,
// How many decimal places are allowed
precision: 2,
// Set if the symbol will stay in the field after the user exits the field.
affixesStay : true,
// Place caret at the end of the input on focus
bringCaretAtEndOnFocus: true
});
</script>
Any ideas what I’m doing wrong?
Here is my site Read-Only: LINK