Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
autonumeric
Advanced tools
autoNumeric is a jQuery plugin that automatically formats currency (money) and numbers as you type on form inputs. It supports most International numeric formats and currency signs including those used in Europe, North and South America, Asia and India (l
Visit my home page for extensive demo's and documentation http://www.decorplanit.com/plugin/
autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs. It supports most International numeric formats and currency signs including those used in Europe, North and South America, Asia and India lakhs (Lakhs values supported below 1 billion).
Any number of currency formats can reside on the same page and are configured by settings/options that can be placed as HTML5 data attribute or passed as an argument. These settings can easily be changed at any time using the new �update� method or via the callback feature. autoNumeric to many other elements, allowing you to place formatted numbers and currency on just about any part of the page.
Seven built in methods gives you the flexibility needed to use autoNumeric to its maximum potential. You can now easily start and stop autoNumeric, update the settings and remove the formatting from multiple inputs, preparing the values for manipulation or form submission.
There are fifteen settings/options which controls the behavior and format of the form input field. These setting are easy to implement with the HTML5 data or options passed as argument.
The settings can also be modified via callback function allows the returned value to be taken as parameter to the default/options settings. You can pass the callback function via options or HTML5 data and can be used on any of the 15 options.
If you are developing sites that span across International lines that use different currency symbols and formats you will find autoNumeric the ideal tool to shorten your development time.
The following is a list of the methods and settings/options the control autoNumeric - please my home page for a complete demo and documentation http://www.decorplanit.com/plugin/
'init' - initializes autoNumeric
'destroy' - stops autoNumeric
'update' - updates autoNumeric's settings
'set' - returns a formatted string via jQuery's ".val()" or ".text' methods to the selected tag(s)
'get' - allows you to easily remove the formatting from a string on a autoNumeric controlled element and returns a string
'getString' - this basically uses jQuery's .serialize() method which creates a text string (URL-encoded notation) from a set of form elements that is ready for submission. The extra step taken here is the string is split and iterated through and the formatted values are replaced with unformatted values. The string is then joined back together and returned
'getArray' - this basically uses jQuery's .serializeArray() method which returns a JavaScript array of objects, ready to be encoded as a JSON string
'getSettings' - this returns an object that shows the autoNumeric settings for the field. You may find this helpful when developing a page
visit my home page for an easy to use settings and option code generator
"aSep" - controls the thousand separator character
"dGroup" - controls the digital grouping and the placement of the thousand separator
"aDec" - controls the decimal character
"altDec" - this was developed to accommodate for different keyboard layouts. altDec allows you to declare an alternative key to enter the decimal separator assigned in aDec
"aSign" - displays the desired currency symbol (examples: � or EUR). Note: other symbols can be used, such as %, �C, �F, km/h & MPH the possibilities are endless
"pSign" - controls the placement of the currency symbol (prefix or suffix)
"vMin" - controls the minimum value allowed
"vMax" - controls the maximum value allowed
Note - setting the vMin and vMax to both positive or negative with situations that limits the users ability to enter the proper values
"mDec" - overrides the decimal places that that are set via the vMin/vMax values
"mRound" - sets the rounding method used (9 different available)
"aPad" - controls padding of the decimal places
"nBracket" - controls if negative values are display with brackets when the input does not have focus
"wEmpty" - controls input display behavior
"lZero" - controls leading zeros behavior
"aForm" - controls if default values are formatted on page ready (load)
"anDefault" - helper option for ASP.NET postback
Changing the defaults via options
You can change the defaults with options via the "init" method or the "update" method after autoNUmeric has been initialized - example:
<input type="text" id="someID" class="someClass">
$('someSelector').autoNumeric('init', {aSign: '� ', vMax: '-999999999.99', nBracket: '(,)'});
Changing the defaults via HTML5 data attribute
You can also change the defaults with HTML5 data attributes - example:
<input type="text" id="someID" class="someClass data-a-sign="� " data-v-max="-999999999.99" data-n-bracket"(,)">
$('someSelector').autoNumeric('init');
Note: By convention the data attribute is written in lower-case. Compound words (example: "aDec") need to be split and separated by a dash. The equal sign separates the name and value. The value should be enclosed with quote marks. If multiple options are being used they each need to have the own data attribute.
1.9.38
FAQs
autoNumeric is a standalone Javascript library that provides live *as-you-type* formatting for international numbers and currencies. It supports most international numeric formats and currencies including those used in Europe, Asia, and North and South Am
The npm package autonumeric receives a total of 27,150 weekly downloads. As such, autonumeric popularity was classified as popular.
We found that autonumeric demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.