jquery-maskmoney icon indicating copy to clipboard operation
jquery-maskmoney copied to clipboard

Decimal dynamic and add static masked method

Open micronull opened this issue 10 years ago • 5 comments

  1. If decimalAfterDot = true, fractional number when the user presses a key and a dot or a comma, or integral number without a fraction.
  2. Add static method masked. When you need only apply the mask to the tag. Without events.

micronull avatar Aug 29 '14 07:08 micronull

See example http://jsfiddle.net/a0tekg6z/

micronull avatar Aug 29 '14 07:08 micronull

My users will love it when it's merged! Thank you!

pilap82 avatar Aug 29 '14 08:08 pilap82

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.

pilap82 avatar Aug 29 '14 08:08 pilap82

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/

micronull avatar Aug 29 '14 09:08 micronull

@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 :)

plentz avatar Feb 28 '15 02:02 plentz