jQuery Price Format Plugin v0.0.1 formats input fields and HTML elements as currency values (e.g., 123456 becomes US$ 1,234.56). It offers customizable options: prefix, suffix, thousands separator, cents separator, clear prefix/suffix on blur, negative values, plus sign, and an unmask function. Released under MIT license. The package is a jQuery plugin with no active updates; similar functionality is available via native JavaScript Intl.NumberFormat.
npm install jquery-price-formatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates loading jQuery and the plugin via script tags, then applying priceFormat to an input with custom prefix and separators, and using unmask to get raw value.
Load jQuery via <script> tag before the plugin script.
Consider using Intl.NumberFormat or a modern formatting library.
Set clearPrefix: true to hide prefix during editing; note that it only clears on blur.
Ensure jQuery is loaded and the plugin script is included after jQuery.
Include jQuery before any plugin scripts: <script src='jquery.js'></script>
Verify element exists and jQuery is loaded.