Overview

Plugin Dependencies

Like Bootstrap, Fuel UX is a collection of jQuery plugins.

Class Dependency

In order for Fuel UX to work, you must have the fuelux class on the body of your document (Or at least on a parent container of the fuelux elements on your page)

Control Initialization

With JavaScript

Initialize a component at any time via JavaScript: {% highlight js %} // initialized with no options specified (fuelux defaults get used) $("#myCombobox").combobox(); // initialized with options specified $('#myCombobox').combobox('selectByIndex', '1'); {% endhighlight %}

Destruction and re-initialization

Fuel UX controls cannot be re-initialized. Passing new options to an already initialized control will do effectively nothing. Many controls have convenience methods that allow some internal variables to be changed; otherwise use Javascript to call the control's destroy() method and initialize again with the newly desired markup and options. The destroy() method will attempt to return the pre-initialization markup for the element being destroyed.

With markup: data-attributes

The Fuel UX team recommends the precision and greater number of options provided by initializing manually via JavaScript.

The following Fuel UX controls (those that that do not require a data source) can be initialized on page load using the data-initialize attribute:

Attribute initialization is used in each section's examples when available.

If control is not present onready, it will be 'lazily' initialized when the user interacts with it (such as on mouseover).

Currently there is a bug causing changed events to fire twice for some elements (such as spinbox). The workaround is to disable this data-api, using $.off('fu.data-api')

Requires Manual Initialization

The following Fuel UX controls require a data source and must be initialized manually:

Events

Fuel UX provides custom events for most components' actions. All events are namespaced with 'fu' and their control name (ex. 'changed.fu.checkbox' ). All Fuel UX events are past tense so that they don't trigger standard and Bootstrap events (eg. changed vs. change). Listening for standard and Bootstrap supported events on an internal element is not tested, and therefore not recommended.

Individual or compiled

Include components either altogether or individually, but never do both (include either individual *.js files, or the unminified fuelux.js, or the minified fuelux.min.js).

Accessibility

ARIA support has been added when appropriate, and all inputs have labels even if they are "screen reader only." All controls are keyboard friendly and can be navigated by tabbing to display a keyboard-focus. Controls have been "fat-finger" tested on touch devices. We care; if you have accessibility issues with Fuel UX controls, please create an issue on GitHub.