Numeral.js, while less complex, was inspired by and heavily borrowed from Moment.js so if you have use momentjs before you should be familiar with this library.
Numbers can be formatted to look like currency, percentages and more.
How to use:
numeral(1000).format('0,0') returns 1,000
numeral(1230974).format('0.0a') returns 1.2m
numeral(1000.234).format('$0,0.00') returns $1,000.23
numeral(1230974).format('($ 0.00 a)') returns $ 1.23 m
numeral(1).format('0%') returns 100%
numeral(0.974878234).format('0.000%') returns 97.488%
For more sample and options go to http://numeraljs.com/.
Tuesday, November 3, 2015
Monday, October 5, 2015
Button click always fires when you press enter key
I've spent hours trying to figure this out, but the solution is just adding the type="button" attribute to the button element.
Issue.
<button id="generateButton" class="btn btn-info btn-sm">Generate</button>
Solution
<button id="generateButton" type="button" class="btn btn-info btn-sm">Generate</button>
I got the solution from this post on SOF.
http://stackoverflow.com/questions/12325066/button-click-event-fires-when-pressing-enter-key-in-different-input-no-forms
Issue.
<button id="generateButton" class="btn btn-info btn-sm">Generate</button>
Solution
<button id="generateButton" type="button" class="btn btn-info btn-sm">Generate</button>
I got the solution from this post on SOF.
http://stackoverflow.com/questions/12325066/button-click-event-fires-when-pressing-enter-key-in-different-input-no-forms
Friday, October 2, 2015
Introducing the YouTube Kids app
Countries outside of the US have kids too, Please Google I need this in Philippines App Store like last February 2015. :)
Labels:
YouTube Kids
Friday, April 24, 2015
Thursday, April 23, 2015
jQuery BBQ: Back Button & Query Library
jQuery BBQ leverages the HTML5 hashchange event to allow simple, yet powerful bookmarkable #hash history. In addition, jQuery BBQ provides a full .deparam() method, along with both hash state management, and fragment / query string parse and merge utility methods.
http://benalman.com/projects/jquery-bbq-plugin/
http://benalman.com/projects/jquery-bbq-plugin/
Labels:
Javascript,
jQuery
Subscribe to:
Posts (Atom)