Tuesday, November 3, 2015

A javascript library for formatting and manipulating numbers.

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/.

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.

<button id="generateButton" class="btn btn-info btn-sm">Generate</button>

<button id="generateButton" type="button" class="btn btn-info btn-sm">Generate</button>

I got the solution from this post on SOF.

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

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.