Sha256: 9e6dd4b463f4f4bf0c7278b6686c0bfd5624c755d0a0bfba553f0783998a922e
Contents?: true
Size: 644 Bytes
Versions: 62
Compression:
Stored size: 644 Bytes
Contents
function CurrencyField(hidden_id, visible_id, options) { this.hidden_id = hidden_id; this.visible_id = visible_id; this.options = options; var THIS = this; $(document).ready(function () { THIS.visibleInput().maskMoney(THIS.options); THIS.visibleInput().maskMoney('mask', parseFloat(THIS.hiddenInput().val())); THIS.visibleInput().change(function () { THIS.hiddenInput().val(THIS.visibleInput().maskMoney('unmasked')[0]); }) }); } CurrencyField.prototype.hiddenInput = function () { return $('#' + this.hidden_id); } CurrencyField.prototype.visibleInput = function () { return $('#' + this.visible_id); }
Version data entries
62 entries across 62 versions & 1 rubygems