Anyone know's a way to describe a cash value or a plugin who does that ?
exp: if i have $ 1.200.000,00 and the user hover()
the value:
description will be "one million two hundred "
Thanks!
The following page mentions a very simple implementation:
Number to Words | Javascript
which can perform the conversion by using this function:
var words = toWords(num);
Using jQuery, you can wrap this inside of your hover function, as shown below:
//This will add a tooltip upon hovering with the "word" value.
$('div').hover(function(){
$(this).attr('title',toWords($(this).text()));
});
Working Demo
Should check the source of this example, with some modification you should be able to achieve this:
http://abhisanoujam.blogspot.com/2009/07/having-fun-with-jquery-numbers-to-words.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With