Numeral.js: A javascript library for formatting and manipulating numbers

Numeral.js is a library aimed at number formatting, it works on Node.js and Browser Javascript. It is easy to use for formatting a number by using a .format(format) function. Numbers can be formatted to look like currency, percentages, times, or even plain old numbers with decimal places, thousands, and abbreviations. For internationalising application, Numeral.js also
Continue reading Numeral.js: A javascript library for formatting and manipulating numbers

jQuery: colorbox

Colorbox is a lightweight customizable lightbox plugin for jQuery. Supports photos, grouping, slideshow, ajax, inline, and iframed content Lightweight: 10KB of JavaScript Appearance is controlled through CSS so it can be restyled Can be extended with callbacks & event-hooks without altering the source files Completely unobtrusive, options are set in the JS and require no
Continue reading jQuery: colorbox

jQuery functions

Get an attribute: attributeValue = $(this).attr(’attributeName’);attributeValue = $(this).attr(‘attributeName’); Checkbox value: if ($(#elementId).is(’:checked’)) { }if ($(#elementId).is(‘:checked’)) { } Remove an attribute: $(’#elementId’).removeAttr(’attributeName’);$(‘#elementId’).removeAttr(‘attributeName’); Set an attribute: $(’#elementId’).attr(’attributeName’, ‘attributeValue’);   // jQuery < 1.6 $(’#elementId’).attr(’checked’, false); $(’#elementId’).attr(’disabled’, ‘disabled’);   jQuery > 1.5 $(’#elementId’).prop(’checked’, true); $(’#elementId’).prop(’checked’, false);   $(’input[name^=elementName]’).attr(’disabled’, ‘disabled’);$(‘#elementId’).attr(‘attributeName’, ‘attributeValue’); // jQuery < 1.6 $(‘#elementId’).attr(‘checked’, false); $(‘#elementId’).attr(‘disabled’, ‘disabled’);
Continue reading jQuery functions

Javascript: XDate – a modern JavaScript date library

XDate is a thin wrapper around JavaScript’s native Date object that provides enhanced functionality for parsing, formatting, and manipulating dates. It implements the same methods as the native Date, so it should seem very familiar. Also, it is non-destructive to the DOM, so it can safely be included in third party libraries without fear of
Continue reading Javascript: XDate – a modern JavaScript date library