Comments (5)
It's not the intention of the library to perform standard jquery operations for
you.
If you wanted to iterate over several items and format them then you would do
just
that, using the each() method in *your* code to format one at a time.
Original comment by [email protected]
on 13 May 2010 at 4:25
- Changed state: Invalid
from jquery-numberformatter.
Sorry, but you are wrong here.
Your method ALLREADY performs iteration on all matched items, see line 209
(return
this.each....) as it also should, to be compliant with jquery plugin authoring
recommendations, but it does that in wrong way! On the second and all
subsequent
items it "forgets" about prefixes and suffixes, it does only formatting.
If your intention was, to only format the first item (which would be very non
jquery
approach), also have to rewrite your code...
Take a look at an example I gave you... This cannot be intended behaviour!!!
Regards, Blaz
Original comment by [email protected]
on 13 May 2010 at 4:41
from jquery-numberformatter.
Ok, looking at your closed issues, I see that my issue is actualy a duplicate
of #19.
What I don't understand is, why don't you make a bugfix release of version
1.1.2,
because this bug is really huge and the fix really simple...
Regards, Blaz
Original comment by [email protected]
on 13 May 2010 at 4:47
from jquery-numberformatter.
Ahhh ok sorry, I forgot the old code did that, been working on the revamped
code recently so not seen the
old code in quite a while, I think the new code doesn't do that, or at least
has this particular issue
fixed. I go so long between dev sessions I forget what the code does :p
There is no bugfix release for 1.1.2 because when I took over the code there
was quite a lot of problems
both logged here and structural, I knew with the limited time I have for the
project it would take me ages
to fix them all (some had been open for 1 year+) then only to carry out the
planned revamp later on.
So I went straight ahead and did the revamp, it's currently on here as 1.2
beta, while it's still not 100%
reworked to be more reliable, clearer and faster it does incorporate the fixes
I've closed since taking
over the project.
So I would recommend taking a look at 1.2, perhaps it's stable enough for what
you need, main changes are
a complete separation of parsing and formatting (format= std notation ->
formatted, parse= formatted ->
std notation), see notes for more details.
I'll look into this more wrt the each() internal usage, perhaps it is wrong as
you say still and not in
line with jquery guidance.
Original comment by [email protected]
on 13 May 2010 at 5:37
- Changed state: New
from jquery-numberformatter.
Working as of 1.2 as expected, see attached.
Original comment by [email protected]
on 9 Oct 2010 at 11:38
- Changed state: Fixed
Attachments:
from jquery-numberformatter.
Related Issues (20)
- numberString.indexOf is not a function HOT 3
- {"format":"#,###","locale":"us"} returns 4,100.00 when calling $.formatNumber - should return 4,100 HOT 2
- Rounding error of negative numbers. HOT 2
- Zero number formats with ,00 HOT 2
- Bug parsing percentages with no decimals HOT 3
- $ using us locale HOT 1
- Allow $ in currency HOT 1
- 1515151515.55 formats to 1,515,151,515.5499999523 instead of ,515,151,515.55 HOT 1
- space as separator HOT 1
- Add locale 'bg' HOT 1
- Feature enhancement: Support for locale 'no' HOT 1
- Allow for square formatting HOT 6
- Can only enter 10-based percentages? HOT 1
- pollutes window object with localeGroup property HOT 2
- Percentages are parsed incorrectly HOT 1
- Plugin does not work with latest version of jhashtable plugin HOT 4
- Fix rounding errors HOT 2
- Number being rounded incorrectly
- I need a python version
- Number of integral digits isn't set properly due to toFixed() method rounding up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-numberformatter.