Skip to content

vistaprint/SkinnyJS

Repository files navigation

skinny.js: Slim little jQuery plugins Build Status

View the project page

skinny.js is a collection of jQuery plugins that are useful for building web applications. Its design is a response to having used too many JavaScript frameworks that require you to buy into a particular philosophy, coding style, or architecture. Instead, skinny.js embraces the single responsibility principle, and aims to create tiny, granular libraries with minimal dependencies.

Download skinny.js

Skinny libraries

  • date-parse: Polyfill for Date.parse to ensure support for ISO 8601 dates. Also provides support for Microsoft JSON format dates.
  • jQuery.clientRect: Gets element coordinates several orders of magnitude more efficiently than jQuery.top()/left()
  • jQuery.cookies: Practically oriented cookie management.
  • jQuery.css: Parses and serializes CSS style strings
  • jQuery.customEvent: A class that implements an observable event, useful for cases where there's no DOM element involved.
  • jQuery.delimitedString: Base class for parsing delimited strings, such as querystrings or CSS styles
  • jQuery.disableEvent: Temporarily disables/enables all event handlers for a DOM element
  • jQuery.hostIframe: Manages references between iframe content and their host window
  • jQuery.hoverDelay: Binds mouseover/out event handlers with a delay. Useful for authoring components with hover-based activation.
  • jQuery.htmlEncode: Bare bones HTML encoding
  • jQuery.imageSize: Some utilities for dealing with image sizes, async loading, and fitting images to a bounding box
  • jQuery.isVisibleKeyCode: Extension to jQuery.Event which indicates if a keypress is a visible character (i.e. not a function or modifier key)
  • jQuery.msAjax: Microsoft friendly AJAX. Handles the quirks of ASMX, WCF, DataJsonContractSerializer, Microsoft's JSON date format, and provides an interface identical to jQuery.ajax().
  • jQuery.ns: Declare namespaces without boilerplate
  • jQuery.partialLoad: Works like jQuery.load, but is more intelligent about executing downloaded scripts (i.e. don't re-run scripts that are already loaded)
  • jQuery.postMessage: Provides cross-document messaging support, works on all browsers to IE6 (without URL fragments and polling).
  • jQuery.proxyAll: Binds functions to their host object (like jQuery.proxy(), but for all functions declared as properties of an object at once)
  • jQuery.queryString: Parses querystrings (the opposite of jQuery.param())
  • jQuery.scrollAnchor: Smooth scrolling support for anchor elements with internal references.
  • jQuery.uncomment: Allows lazy evaluation of HTML blobs by removing them from comment blocks.
  • jQuery.url: Parses and serializes URLs.

Skinny UI components

  • jQuery.menu: A traditional hierarchical menu widget, designed from the ground up to be both touch and mouse friendly. TODO: Get existing docs from the wiki
  • jQuery.modalDialog: A powerful modal dialog system that works across all devices: TODO: Get existing docs from the wiki
  • jQuery.richTooltip: Responsive tooltips that support HTML content.

Dependencies

skinny.js libraries were designed to have minimal dependencies, and are not intended to be used as a bundle. For this reason, we don't provide a concatenated, minified version of the whole set of libraries. Take the libraries you need, include their dependencies, and concatenate/minify to your heart's content using your own project's build system.

How do I know what dependencies my file has?

All dependencies in skinny.js plugins are marked at the top using the following syntax:

/// <reference path="{path}" />

Contributing

Pull requests must build and pass unit tests to be accepted. New functionality should also include unit tests. To build and run unit tests:

  1. Ensure you have node.js installed
  2. cd {repo dir}
  3. npm install grunt-cli -g
  4. npm install
  5. grunt

Origin

The libraires that comprise skinny.js were written at Vistaprint.

Vistaprint empowers more than 15 million micro businesses and consumers annually with affordable, professional options to make an impression. With a unique business model supported by proprietary technologies, high-volume production facilities, and direct marketing expertise, Vistaprint offers a wide variety of products and services that micro businesses can use to expand their business. A global company, Vistaprint employs over 4,100 people, operates more than 25 localized websites globally and ships to more than 130 countries around the world. Vistaprint's broad range of products and services are easy to access online, 24 hours a day at www.vistaprint.com.