jquery-maskmoney
jquery-maskmoney copied to clipboard
Decimal dynamic and add static masked method
- If decimalAfterDot = true, fractional number when the user presses a key and a dot or a comma, or integral number without a fraction.
- Add static method masked. When you need only apply the mask to the tag. Without events.
See example http://jsfiddle.net/a0tekg6z/
My users will love it when it's merged! Thank you!
FYI, the fiddle doesn't work, my browser refuses to load the script (Chrome, OSX). However, if I copy / paste the content of the external script at the beginning of the Javascript pane of JSfiddle, it works fine.
Cool. I'm changed the function to the class, so now it will be easier to add functionality.
Correct example for chrome. I used firefox on the old example. http://jsfiddle.net/a0tekg6z/1/
@De-Luxis sorry for taking so long for reply! A lot of users already asked to allow something like your pull request, but this is missing one point: formatting the number on the blur(example, if the users set the precision to 2, on blur, 1000
must be 1000,00
, even if the user only typed 1000
, since we need to apply the mask that the user asked for). Another thing: you changed a lot of the indentation and it's pretty hard to know exactly which parts of the code you have changed. Can you update the PR keeping the current indentation? (like what appears when you look here https://github.com/plentz/jquery-maskmoney/pull/138/files?w=1)
Thanks in advance, you rock :)