Skip to content

A MooTools implementation of Pixelmatrix Design's jQuery plugin Uniform.

Notifications You must be signed in to change notification settings

thesnews/Mooniform

Repository files navigation

Mooniform

A MooTools implementation of Pixelmatrix Design’s jQuery plugin
Uniform.

A more-or-less direct port of Uniform v1.5

Mooniform uses the exact same CSS and image sprite files as Uniform.

Mooniform 1.0

Element.mooniform( [options] )
Elements.mooniform( [options] )

Usage:

	
document.addEvent( 'domready', function() {
	$$( 'select, input[type=checkbox], input[type=radio], input[type=file]' ).mooniform();
});

Mooniform doesn’t automatically know when you’ve updated a value by means
other than direct select (i.e. you’ve changed the value with some
javascript). In that case you’ll need to call the ‘updateAll’ static:

function() {
	$('foo').value = 'Bark';
	Mooniform.updateAll();
}

Options:
– selectClass (string) class for select boxes
– radioClass (string) class for radio inputs
– checkboxClass (string) class for checkbox inputs
– fileClass (string) class for file inputs
– filenameClass (string) class for filename descriptor
– fileBtnClass (string) class for add file button
– fileDefaultText (string) default text for file box
– fileBtnText (string) text for add file button
– checkedClass (string) checked class for radios and checkboxes
– focusClass (string) focused class
– disabledClass (string) disabled class
– activeClass (string) active class
– hoverClass (string) hover class
– useID (bool) attach element ID to styled container
– idPrefix (string) prefix text for IDs when above flag is true

Class Methods:
– void updateAll( void ) – Updates value and state of all styled elements
– void resetAll( void ) – Resets value and state back to default

Instance Methods:
– void stylize( void ) – Style element, attach proper events
– void update( void ) – Update value and state
– void reset( void ) – Reset to default value and state

Disabling text selection is based on jQuery noSelect plugin by
Mathias Bynens <http://mathiasbynens.be/>
<http://github.com/mathiasbynens/noSelect-jQuery-Plugin>

Uniform is Copyright 2009 Josh Pyles / Pixelmatrix Design LLC
<http://pixelmatrixdesign.com>

Mooniform is Copyright 2010 The State News, INC
<http://statenews.com>

Requires: Mootools 1.2.4+

Author: mike joseph <[email protected]>

License:
MIT License – http://www.opensource.org/licenses/mit-license.php

About

A MooTools implementation of Pixelmatrix Design's jQuery plugin Uniform.

Resources

Stars

Watchers

Forks

Packages

No packages published