Overview

Individual or compiled

Plugins can be included individually (using Bootstrap's individual *.js files), or all at once (using bootstrap.js or the minified bootstrap.min.js).

Using the compiled JavaScript

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

Plugin dependencies

Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery (this means jQuery must be included before the plugin files). Consult our bower.json to see which versions of jQuery are supported.

Data attributes

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first-class API and should be your first consideration when using a plugin.

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the document namespaced with data-api. This looks like this:


$(document).off('.data-api')

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:


$(document).off('.alert.data-api')

Only one plugin per element via data attributes

Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a modal. To accomplish this, use a wrapping element.

Programmatic API

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.


$('.btn.danger').button('toggle').addClass('fat')

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):


$('#myModal').modal()                      // initialized with defaults
$('#myModal').modal({ keyboard: false })   // initialized with no keyboard
$('#myModal').modal('show')                // initializes and invokes show immediately

Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel="popover"]').data('popover').

Default settings

You can change the default settings for a plugin by modifying the plugin's Constructor.DEFAULTS object:


$.fn.modal.Constructor.DEFAULTS.keyboard = false // changes default for the modal plugin's `keyboard` option to false

No conflict

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.


var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the Bootstrap functionality

Events

Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is triggered on the completion of an action.

As of 3.0.0, all Bootstrap events are namespaced.

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.


$('#myModal').on('show.bs.modal', function (e) {
  if (!data) return e.preventDefault() // stops modal from being shown
})

Version numbers

The version of each of Bootstrap's jQuery plugins can be accessed via the VERSION property of the plugin's constructor. For example, for the tooltip plugin:


$.fn.tooltip.Constructor.VERSION // => "{{ site.current_version }}"

No special fallbacks when JavaScript is disabled

Bootstrap's plugins don't fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use <noscript> to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.

Third-party libraries

Bootstrap does not officially support third-party JavaScript libraries like Prototype or jQuery UI. Despite .noConflict and namespaced events, there may be compatibility problems that you need to fix on your own.

Affix affix.js

Example

The affix plugin toggles position: fixed; on and off, emulating the effect found with position: sticky;. The subnavigation on the right is a live demo of the affix plugin.


Usage

Use the affix plugin via data attributes or manually with your own JavaScript. In both situations, you must provide CSS for the positioning and width of your affixed content.

Note: Do not use the affix plugin on an element contained in a relatively positioned element, such as a pulled or pushed column, due to a Safari rendering bug.

Positioning via CSS

The affix plugin toggles between three classes, each representing a particular state: .affix, .affix-top, and .affix-bottom. You must provide the styles, with the exception of position: fixed; on .affix, for these classes yourself (independent of this plugin) to handle the actual positions.

Here's how the affix plugin works:

  1. To start, the plugin adds .affix-top to indicate the element is in its top-most position. At this point no CSS positioning is required.
  2. Scrolling past the element you want affixed should trigger the actual affixing. This is where .affix replaces .affix-top and sets position: fixed; (provided by Bootstrap's CSS).
  3. If a bottom offset is defined, scrolling past it should replace .affix with .affix-bottom. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add position: absolute; when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.

Follow the above steps to set your CSS for either of the usage options below.

Via data attributes

To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Use offsets to define when to toggle the pinning of an element.


<div data-spy="affix" data-offset-top="60" data-offset-bottom="200">
  ...
</div>

Via JavaScript

Call the affix plugin via JavaScript:


$('#myAffix').affix({
  offset: {
    top: 100,
    bottom: function () {
      return (this.bottom = $('.footer').outerHeight(true))
    }
  }
})

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

Name type default description
offset number | function | object 10 Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and bottom directions. To provide a unique, bottom and top offset just provide an object offset: { top: 10 } or offset: { top: 10, bottom: 5 }. Use a function when you need to dynamically calculate an offset.
target selector | node | jQuery element the window object Specifies the target element of the affix.

Methods

.affix(options)

Activates your content as affixed content. Accepts an optional options object.


$('#myAffix').affix({
  offset: 15
})

.affix('checkPosition')

Recalculates the state of the affix based on the dimensions, position, and scroll position of the relevant elements. The .affix, .affix-top, and .affix-bottom classes are added to or removed from the affixed content according to the new state. This method needs to be called whenever the dimensions of the affixed content or the target element are changed, to ensure correct positioning of the affixed content.

$('#myAffix').affix('checkPosition')

Events

Bootstrap's affix plugin exposes a few events for hooking into affix functionality.

Event Type Description
affix.bs.affix This event fires immediately before the element has been affixed.
affixed.bs.affix This event is fired after the element has been affixed.
affix-top.bs.affix This event fires immediately before the element has been affixed-top.
affixed-top.bs.affix This event is fired after the element has been affixed-top.
affix-bottom.bs.affix This event fires immediately before the element has been affixed-bottom.
affixed-bottom.bs.affix This event is fired after the element has been affixed-bottom.

Alert messages alert.js

Example alerts

Add dismiss functionality to all alert messages with this plugin.

When using a .close button, it must be the first child of the .alert-dismissible and no text content may come before it in the markup.

Usage

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality. Closing an alert removes it from the DOM.


<button class="close" data-dismiss="alert" type="button" aria-label="Close">
  <span aria-hidden="true">&times;</span>
</button>

To have your alerts use animation when closing, make sure they have the .fade and .in classes already applied to them.

Methods

$().alert()

Makes an alert listen for click events on descendant elements which have the data-dismiss="alert" attribute. (Not necessary when using the data-api's auto-initialization.)

$().alert('close')

Closes an alert by removing it from the DOM. If the .fade and .in classes are present on the element, the alert will fade out before it is removed.

Events

Bootstrap's alert plugin exposes a few events for hooking into alert functionality.

Event Type Description
close.bs.alert This event fires immediately when the close instance method is called.
closed.bs.alert This event is fired when the alert has been closed (will wait for CSS transitions to complete).

$('#myAlert').on('closed.bs.alert', function () {
  // do something…
})

Buttons button.js

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

Cross-browser compatibility

Firefox persists form control states (disabledness and checkedness) across page loads. A workaround for this is to use autocomplete="off". See Mozilla bug #654072.

Stateful

Add data-loading-text="Loading..." to use a loading state on a button.

This feature is deprecated since v3.3.5 and has been removed in v4.

Use whichever state you like!

For the sake of this demonstration, we are using data-loading-text and $().button('loading'), but that's not the only state you can use. See more on this below in the $().button(string) documentation.


<button class="btn btn-primary" id="myButton" data-loading-text="Loading..." type="button" autocomplete="off">
  Loading state
</button>

<script>
  $('#myButton').on('click', function () {
    var $btn = $(this).button('loading')
    // business logic...
    $btn.button('reset')
  })
</script>

Single toggle

Add data-toggle="button" to activate toggling on a single button.

Pre-toggled buttons need .active and aria-pressed="true"

For pre-toggled buttons, you must add the .active class and the aria-pressed="true" attribute to the button yourself.


<button class="btn btn-primary" data-toggle="button" type="button" aria-pressed="false" autocomplete="off">
  Single toggle
</button>

Checkbox / Radio

Add data-toggle="buttons" to a .btn-group containing checkbox or radio inputs to enable toggling in their respective styles.

Preselected options need .active

For preselected options, you must add the .active class to the input's label yourself.

Visual checked state only updated on click

If the checked state of a checkbox button is updated without firing a click event on the button (e.g. via <input type="reset"> or via setting the checked property of the input), you will need to toggle the .active class on the input's label yourself.


<div class="btn-group" data-toggle="buttons">
  <label class="btn btn-primary active">
    <input type="checkbox" autocomplete="off" checked> Checkbox 1 (pre-checked)
  </label>
  <label class="btn btn-primary">
    <input type="checkbox" autocomplete="off"> Checkbox 2
  </label>
  <label class="btn btn-primary">
    <input type="checkbox" autocomplete="off"> Checkbox 3
  </label>
</div>

<div class="btn-group" data-toggle="buttons">
  <label class="btn btn-primary active">
    <input id="option1" name="options" type="radio" autocomplete="off" checked> Radio 1 (preselected)
  </label>
  <label class="btn btn-primary">
    <input id="option2" name="options" type="radio" autocomplete="off"> Radio 2
  </label>
  <label class="btn btn-primary">
    <input id="option3" name="options" type="radio" autocomplete="off"> Radio 3
  </label>
</div>

Methods

$().button('toggle')

Toggles push state. Gives the button the appearance that it has been activated.

$().button('reset')

Resets button state - swaps text to original text. This method is asynchronous and returns before the resetting has actually completed.

$().button(string)

Swaps text to any data defined text state.


<button class="btn btn-primary" id="myStateButton" data-complete-text="finished!" type="button" autocomplete="off">
  ...
</button>

<script>
  $('#myStateButton').on('click', function () {
    $(this).button('complete') // button text will be "finished!"
  })
</script>

Carousel carousel.js

A slideshow component for cycling through elements, like a carousel. Nested carousels are not supported.


<div class="carousel slide" id="carousel-example-generic" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li class="active" data-target="#carousel-example-generic" data-slide-to="0"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="..." alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
    <div class="item">
      <img src="..." alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
    ...
  </div>

  <!-- Controls -->
  <a class="left carousel-control" data-slide="prev" href="#carousel-example-generic" role="button">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" data-slide="next" href="#carousel-example-generic" role="button">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

Optional captions

Add captions to your slides easily with the .carousel-caption element within any .item. Place just about any optional HTML within there and it will be automatically aligned and formatted.


<div class="item">
  <img src="..." alt="...">
  <div class="carousel-caption">
    <h3>...</h3>
    <p>...</p>
  </div>
</div>

Multiple carousels

Carousels require the use of an id on the outermost container (the .carousel) for carousel controls to function properly. When adding multiple carousels, or when changing a carousel's id, be sure to update the relevant controls.

Via data attributes

Use data attributes to easily control the position of the carousel. data-slide accepts the keywords prev or next, which alters the slide position relative to its current position. Alternatively, use data-slide-to to pass a raw slide index to the carousel data-slide-to="2", which shifts the slide position to a particular index beginning with 0.

The data-ride="carousel" attribute is used to mark a carousel as animating starting at page load. It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.

Via JavaScript

Call carousel manually with:


$('.carousel').carousel()

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval="".

Name type default description
interval number 5000 The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
pause string "hover" Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
wrap boolean true Whether the carousel should cycle continuously or have hard stops.
keyboard boolean true Whether the carousel should react to keyboard events.

.carousel(options)

Initializes the carousel with an optional options object and starts cycling through items.


$('.carousel').carousel({
  interval: 2000
})

.carousel('cycle')

Cycles through the carousel items from left to right.

.carousel('pause')

Stops the carousel from cycling through items.

.carousel(number)

Cycles the carousel to a particular frame (0 based, similar to an array).

.carousel('prev')

Cycles to the previous item.

.carousel('next')

Cycles to the next item.

Bootstrap's carousel class exposes two events for hooking into carousel functionality.

Both events have the following additional properties:

  • direction: The direction in which the carousel is sliding (either "left" or "right").
  • relatedTarget: The DOM element that is being slid into place as the active item.

All carousel events are fired at the carousel itself (i.e. at the <div class="carousel">).

Event Type Description
slide.bs.carousel This event fires immediately when the slide instance method is invoked.
slid.bs.carousel This event is fired when the carousel has completed its slide transition.

$('#myCarousel').on('slide.bs.carousel', function () {
  // do something…
})

Checkbox checkbox.js

The checkbox control provides a customized look and feel that can be standardized across all browsers.

Usage

Via JavaScript

Initialize the checkbox control via JavaScript:

$('#myCheckbox').checkbox();

Via data-attributes

  • Checkbox input elements that exist when $.ready() executes that have data-initialize="checkbox" on their parent will be initialized immediately.
  • Checkbox input elements that are created with data-initialize="checkbox" after $.ready() executes will initialize when a mouseover event occurs on them.

Deprecated checkbox markup

Before v3.8.0, the checkbox control could be bound with $().checkbox(); or data-initialize="checkbox" to the div.checkbox or the input elements. This is no longer supported. Please update your markup and JavaScript to be bound to the label only.

Methods

Once your checkbox is initialized, you can execute any of the following methods on it:

.checkbox('check')
Ensures the checkbox is checked.
.checkbox('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup as close to it's pre-initialization state as possible.
.checkbox('disable')
Ensures the checkbox is disabled.
.checkbox('enable')
Ensures the checkbox is enabled.
.checkbox('isChecked')
Returns true or false indicating the checked state of the checkbox.
.checkbox('toggle')
Toggles the checkbox between checked/unchecked states.
.checkbox('uncheck')
Ensures the checkbox is unchecked.

Events

Event Type Description
enabled.fu.checkbox Event fires when checkbox is enabled
disabled.fu.checkbox Event fires when checkbox is disabled
checked.fu.checkbox Event fires when checkbox is checked
unchecked.fu.checkbox Event fires when checkbox is unchecked

All checkbox events are fired on the .checkbox classed element. However, unlike the majority of Fuel UX controls, it is recommended to listen to and check the state of the checkbox control by listening to the native checkbox with the change event and check its status with the presence of the checked attribute. For the sample markup provided, this would be:


$('.checkbox input').on('change', function () {
  console.log( $(this).is(':checked') );
});

Examples

Default (stacked)


<div class="checkbox" id="myCheckbox">
  <label class="checkbox-custom" data-initialize="checkbox">
    <input class="sr-only" type="checkbox" value="">
    <span class="checkbox-label">Custom checkbox unchecked on page load</span>
  </label>
</div>
<div class="checkbox" id="myCheckbox2">
  <label class="checkbox-custom checked" data-initialize="checkbox">
    <input class="sr-only" checked="checked" type="checkbox" value="">
    <span class="checkbox-label">Custom checkbox checked on page load</span>
  </label>
</div>
<div class="checkbox" id="myCheckbox3">
  <label class="checkbox-custom disabled" data-initialize="checkbox">
    <input class="sr-only" disabled="disabled" type="checkbox" value="">
    <span class="checkbox-label">Disabled custom checkbox unchecked on page load</span>
  </label>
</div>
<div class="checkbox" id="myCheckbox4">
  <label class="checkbox-custom checked disabled" data-initialize="checkbox">
    <input class="sr-only" checked="checked" disabled="disabled" type="checkbox" value="">
    <span class="checkbox-label">Disabled custom checkbox checked on page load</span>
  </label>
</div>

Inline checkboxes

Use the .checkbox-inline class on checkboxes for controls that appear on the same line.


<label  class="checkbox-custom checkbox-inline" id="myCheckbox5" data-initialize="checkbox">
  <input class="sr-only" type="checkbox" value="option1"> <span class="checkbox-label">1</span>
</label>
<label  class="checkbox-custom checkbox-inline" id="myCheckbox6" data-initialize="checkbox">
  <input class="sr-only" checked="checked" type="checkbox" value="option2"> <span class="checkbox-label">2</span>
</label>
<label  class="checkbox-custom checkbox-inline disabled" id="myCheckbox7" data-initialize="checkbox">
  <input class="sr-only" disabled="disabled" type="checkbox" value="option3"> <span class="checkbox-label">3</span>
</label>

Addon checkboxes

Place any checkbox option within an input group's addon instead of text.


  <div class="input-group">
    <label class="input-group-addon checkbox-custom checkbox-inline" data-initialize="checkbox">
      <input class="sr-only" type="checkbox" value="option1">
    </label>
    <input class="form-control" type="text">
  </div>

Element toggling checkboxes

Use the data-toggle="{{selector}}" to automatically show or hide elements matching the selector within the body upon check or uncheck. This control works with any jQuery selector.

ID toggling container
Class toggling container
Class toggling container

<div class="checkbox" id="myCheckbox8">
  <label class="checkbox-custom" data-initialize="checkbox">
    <input class="sr-only" data-toggle="#checkboxToggleID" type="checkbox" value="option1">
    <span class="checkbox-label">Toggles element with matching ID</span>
  </label>
</div>
<label class="checkbox-custom checkbox-inline" id="myCheckbox9" data-initialize="checkbox">
  <input class="sr-only" data-toggle=".checkboxToggleCLASS" type="checkbox" value="option1">
  <span class="checkbox-label">Toggles elements with matching class.</span>
</label>

<div class="alert bg-info" id="checkboxToggleID">ID toggling container</div>
<div class="alert bg-success checkboxToggleCLASS">Class toggling container</div>
<div class="alert bg-success checkboxToggleCLASS">Class toggling container</div>

Highlighting checkboxes

Use the .highlight class to add a background highlight upon check.


<div class="checkbox highlight" id="myCheckbox10">
  <label class="checkbox-custom highlight" data-initialize="checkbox">
    <input class="sr-only" type="checkbox" value="option1">
    This control highlights a block-level checkbox on check
  </label>
</div>
<label class="checkbox-custom checkbox-inline highlight" id="myCheckbox11" data-initialize="checkbox">
  <input class="sr-only" type="checkbox" value="option2">
  This control highlights an inline checkbox on check
</label>

Events

Unlike the majority of Fuel UX controls, it is recommended to listen to and check the state of the checkbox control by listening to the native checkbox with the change event and check its status with the presence of the checked attribute. For the sample markup provided, this would be:


$('.checkbox input').on('change', function () {
  console.log( $(this).is(':checked') );
});

Collapse collapse.js

Flexible plugin that utilizes a handful of classes for easy toggle behavior.

Plugin dependency

Collapse requires the transitions plugin to be included in your version of Bootstrap.

Example

Click the buttons below to show and hide another element via class changes:

  • .collapse hides content
  • .collapsing is applied during transitions
  • .collapse.in shows content

You can use a link with the href attribute, or a button with the data-target attribute. In both cases, the data-toggle="collapse" is required.

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.

<a class="btn btn-primary" data-toggle="collapse" role="button" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
  Link with href
</a>
<button class="btn btn-primary" data-toggle="collapse" data-target="#collapseExample" type="button" aria-expanded="false" aria-controls="collapseExample">
  Button with data-target
</button>
<div class="collapse" id="collapseExample">
  <div class="well">
    ...
  </div>
</div>

Accordion example

Extend the default collapse behavior to create an accordion with the panel component.

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <div class="panel panel-default">
    <div class="panel-heading" id="headingOne" role="tab">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" role="button" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
          Collapsible Group Item #1
        </a>
      </h4>
    </div>
    <div class="panel-collapse collapse in" id="collapseOne" role="tabpanel" aria-labelledby="headingOne">
      <div class="panel-body">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading" id="headingTwo" role="tab">
      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" role="button" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
          Collapsible Group Item #2
        </a>
      </h4>
    </div>
    <div class="panel-collapse collapse" id="collapseTwo" role="tabpanel" aria-labelledby="headingTwo">
      <div class="panel-body">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading" id="headingThree" role="tab">
      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" role="button" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
          Collapsible Group Item #3
        </a>
      </h4>
    </div>
    <div class="panel-collapse collapse" id="collapseThree" role="tabpanel" aria-labelledby="headingThree">
      <div class="panel-body">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
</div>

It's also possible to swap out .panel-bodys with .list-groups.

  • Bootply
  • One itmus ac facilin
  • Second eros

Make expand/collapse controls accessible

Be sure to add aria-expanded to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of aria-expanded="false". If you've set the collapsible element to be open by default using the in class, set aria-expanded="true" on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.

Additionally, if your control element is targetting a single collapsible element – i.e. the data-target attribute is pointing to an id selector – you may add an additional aria-controls attribute to the control element, containing the id of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.

Usage

The collapse plugin utilizes a few classes to handle the heavy lifting:

  • .collapse hides the content
  • .collapse.in shows the content
  • .collapsing is added when the transition starts, and removed when it finishes

These classes can be found in component-animations.less.

Via data attributes

Just add data-toggle="collapse" and a data-target to the element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

Via JavaScript

Enable manually with:


$('.collapse').collapse()

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

Name type default description
parent selector false If a selector is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the panel class)
toggle boolean true Toggles the collapsible element on invocation

Methods

.collapse(options)

Activates your content as a collapsible element. Accepts an optional options object.


$('#myCollapsible').collapse({
  toggle: false
})

.collapse('toggle')

Toggles a collapsible element to shown or hidden. Returns to the caller before the collapsible element has actually been shown or hidden (i.e. before the shown.bs.collapse or hidden.bs.collapse event occurs).

.collapse('show')

Shows a collapsible element. Returns to the caller before the collapsible element has actually been shown (i.e. before the shown.bs.collapse event occurs).

.collapse('hide')

Hides a collapsible element. Returns to the caller before the collapsible element has actually been hidden (i.e. before the hidden.bs.collapse event occurs).

Events

Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

Event Type Description
show.bs.collapse This event fires immediately when the show instance method is called.
shown.bs.collapse This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.collapse This event is fired immediately when the hide method has been called.
hidden.bs.collapse This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).

$('#myCollapsible').on('hidden.bs.collapse', function () {
  // do something…
})

Combobox combobox.js

The combobox control combines an input and a drop-down for easy and flexible data selection. Combobox also offers many methods that allow you to programmatically manipulate it.

Usage

Via JavaScript

Call the combobox control via JavaScript:

$('#myCombobox').combobox();

The combobox also accepts an optional options param during initialization:

$('#myCombobox').combobox({autoResizeMenu: false});

Via data-attributes

Add data-initialize="combobox" to the .combobox element that you wish to initialize on $.ready(). Any combobox that is programmatically generated after the initial page load will initialize when the mousedown event is fired on it if it has data-initialize="combobox".

Markup

A combobox consists of an input group containing a text input with a selectlist appended to it.


<div class="input-group input-append dropdown combobox" id="myCombobox" data-initialize="combobox">
  <input class="form-control" type="text">
  <div class="input-group-btn">
    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
    <ul class="dropdown-menu dropdown-menu-right">
      <li data-value="1"><a href="#">One</a></li>
      ...
    </ul>
  </div>
</div>

Markup options

The following options are applicable to the li elements of the selectlist. Append the option name to data-, as in data-selected="true".

Name type default description
selected boolean false Indicates element should be selected by default.

Programmatic options

Should be passed in as an object (eg. {name: value}) on intialization. Javascript initialization is required (you can't initialize through data-attributes) if you would like to use this.

Name type default description
autoResizeMenu boolean true Resizes the drop-down menu to the width of the combobox

Methods

Once your combobox is initialized, you can execute any of the following methods on it:

.combobox('destroy')
Remove all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.combobox('disable')
Disable the combobox
.combobox('enable')
Enable the combobox
.combobox('selectedItem')
Returns an object containing a text property with the visible text of the selected item as well as the results of a jQuery .data() call on the selected item (which will map the contents of any data-* attributes into the returned object).
.combobox('selectByIndex')
Set the selected item based on its index in the list (zero-based index). Convenience method for .selectBySelector('li:eq({index})')
$('#myCombobox').combobox('selectByIndex', '1');
.combobox('selectByText')
Set the selected item based on its text value.
$('#myCombobox').combobox('selectByText', 'Four');
.combobox('selectBySelector')
Set the selected item based on a selector.
$('#myCombobox').combobox('selectBySelector', 'li[data-fizz=buzz]');
.combobox('selectByValue')
Set the selected item based on its value. Convenience method for .selectBySelector('data-value={value}') that requires the item to include a .data-value="{value}" attribute
$('#myCombobox').combobox('selectByValue', '1');

Events

Event Type Description
changed.fu.combobox This event fires when the value changes (either by selecting an item from the list or updating the input value directly). Arguments include event, data where data represents the same object structure returned by the selectedItem method.

All combobox event listeners should be attached to the element containing the combobox class; given the following HTML:


<div class="input-group input-append dropdown combobox" id="myCombobox" data-initialize="combobox">..</div>

You would attach your event listener thusly:


$('#myCombobox').on('changed.fu.combobox', function (evt, data) {
  // do something…
});

Examples


Sample Methods

<div class="input-group input-append dropdown combobox" id="myCombobox" data-initialize="combobox">
	<input class="form-control" type="text">
	<div class="input-group-btn">
		<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button"><span class="caret"></span></button>
		<ul class="dropdown-menu dropdown-menu-right">
			<li data-value="1"><a href="#">One</a></li>
			<li data-value="2"><a href="#">Two</a></li>
			<li data-value="3"><a href="#">Three</a></li>
			<li data-value="4" ><a href="#">Four</a></li>
			<li data-value="Item Five" data-foo="bar" data-fizz="buzz"><a href="#">Item Five</a></li>
		</ul>
	</div>
</div>

Alignment

The dropdown-menu-right class on the ul in the example markup causes the drop-down menu to appear directly underneath the dropdown, its right side appearing flush with the right side of the triggering element. If you wish the dropdown menu's left side to align with the left side of the triggering button's left side, exclude the dropdown-menu-right class on the ul.

Datepicker datepicker.js

The datepicker() control provides the user with the ability to choose a date from a highly customizable calender. Datepicker also offers many methods that allow you to programmatically manipulate it.

Usage

Via JavaScript

Initialize the datepicker() via JavaScript (accepting default options):

$('#myDatepicker').datepicker();

Initialize the datepicker() via JavaScript specifying your own options:


$('#myDatepicker').datepicker({
  allowPastDates: true
});

Via data-attributes

  • Datepicker controls that exist when $().ready() executes that have data-initialize="datepicker" on them will be initialized immediately
  • Datepicker controls that are created with data-initialize="datepicker" after $.ready() executes will initialize when a mousedown event occurs on them.

Markup

The datepicker() markup is complex and specific. On initialization, the datepicker() plugin searches inside of the specified element for the components used to build the control. For your convenience, we have written the required markup for you. Writing custom datepicker() markup is not recommended; if you choose to do so, understanding the datepicker.js code will be necessary.


<div class="input-group">
  <input class="form-control" id="myDatepickerInput" type="text"/>
  <div class="input-group-btn">
    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
      <span class="glyphicon glyphicon-calendar"></span>
      <span class="sr-only">Toggle Calendar</span>
    </button>
    <div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
      <div class="datepicker-calendar">
        <div class="datepicker-calendar-header">
          <button class="prev" type="button"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
          <button class="next" type="button"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
          <button class="title" type="button">
              <span class="month">
                <span data-month="0">January</span>
                <span data-month="1">February</span>
                <span data-month="2">March</span>
                <span data-month="3">April</span>
                <span data-month="4">May</span>
                <span data-month="5">June</span>
                <span data-month="6">July</span>
                <span data-month="7">August</span>
                <span data-month="8">September</span>
                <span data-month="9">October</span>
                <span data-month="10">November</span>
                <span data-month="11">December</span>
              </span> <span class="year"></span>
          </button>
        </div>
        <table class="datepicker-calendar-days">
          <thead>
          <tr>
            <th>Su</th>
            <th>Mo</th>
            <th>Tu</th>
            <th>We</th>
            <th>Th</th>
            <th>Fr</th>
            <th>Sa</th>
          </tr>
          </thead>
          <tbody></tbody>
        </table>
        <div class="datepicker-calendar-footer">
          <button class="datepicker-today" type="button">Today</button>
        </div>
      </div>
      <div class="datepicker-wheels" aria-hidden="true">
        <div class="datepicker-wheels-month">
          <h2 class="header">Month</h2>
          <ul>
            <li data-month="0"><button type="button">Jan</button></li>
            <li data-month="1"><button type="button">Feb</button></li>
            <li data-month="2"><button type="button">Mar</button></li>
            <li data-month="3"><button type="button">Apr</button></li>
            <li data-month="4"><button type="button">May</button></li>
            <li data-month="5"><button type="button">Jun</button></li>
            <li data-month="6"><button type="button">Jul</button></li>
            <li data-month="7"><button type="button">Aug</button></li>
            <li data-month="8"><button type="button">Sep</button></li>
            <li data-month="9"><button type="button">Oct</button></li>
            <li data-month="10"><button type="button">Nov</button></li>
            <li data-month="11"><button type="button">Dec</button></li>
          </ul>
        </div>
        <div class="datepicker-wheels-year">
          <h2 class="header">Year</h2>
          <ul></ul>
        </div>
        <div class="datepicker-wheels-footer clearfix">
          <button class="btn datepicker-wheels-back" type="button"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
          <button class="btn datepicker-wheels-select" type="button">Select <span class="sr-only">Month and Year</span></button>
        </div>
      </div>
    </div>
  </div>
</div>

Options

If initializing through JavaScript, datepicker() allows you to specify options.

Name type default description
allowPastDates boolean false Dictates whether past dates can be input or selected by the user.
date Date object, string, or falsy value ('', null, or false) new Date() Specifies the date that is set upon initialization. If using a string, the format must be a valid date string as supported by the browser or by moment.js if available. Falsy values will result in no date being set upon initialization.
formatDate function or null null Function that is called for formatting a valid date object. Should only be overriden if the datepicker's default formatDate method is not sufficient for your needs. The formatDate function takes a date object as an argument, and should return a string.
momentConfig object {
    culture: 'en',
    format: 'L'
}
Settings used to configure moment.js, if available. Both culture and format attributes must be present for moment features to be utilized. The culture attribute is a string representing the desired datepicker() language. The format attribute is a string representing the desired date format that appears in the input upon date selection. Consult the moment.js docs for more information on supported cultures and formats.
parseDate function or null null Function that is called for parsing date strings input by the user. Should only be overriden if the datepicker's default parseDate method is not sufficient for your needs. The parseDate function takes a date object, string, or falsy value as an argument, and should return either a valid date object representing the successfully parsed value or invalid date object (new Date(NaN))
restricted array [] Specifies dates that are restricted from user input and selection. Uses an array of objects to provide the ranges. Each of the object must have the following format: { from: '03/31/2015', to: '03/31/2016' }, but multiple ranges are supported. The from attribute represents the start date of the restricted range, and the to attribute represents the end date of the range, inclusively. Both attributes can be set to either a valid date string or a date object. -Infinity and Infinity are valid delimiters. View this gist to see how to set the datepicker to only allow dates from the past 365 days.
sameYearOnly boolean false Prevents the user from selecting dates outside the current year if true.
twoDigitYearProtection boolean true Attempts to accommodate for people entering two digit years. Only works if moment is being used to parse date. Otherwise browser parsing is used (which is inconsistent)

Date Parsing and MomentJS

MomentJS parsing is the same format for the API as the output within the input element. Datepicker's default MomentJS locale is regionalistic (American). If you are using MomentJS (and it is recommended that you do), option strings such as those within restricted date ranges expect the format that you provide within momentConfig. Locales and formats are available in the MomentJS documentation. The default locale configuration is momentConfig: { culture: 'en', format: 'L' }

Therefore if you do not specify your own locale and format, restricted will be expecting an array of objects of the'MM/DD/YYYY' format--that is the 'L' MomentJS format. An example of this would be restricted: [{ from: '08/10/2014', to: '08/15/2014' }]

Methods

.datepicker('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.datepicker('disable')
Ensures the component is disabled
.datepicker('enable')
Ensures the component is enabled
.datepicker('getDate')
Returns the selected date (not formatted)
.datepicker('getFormattedDate')
Returns the selected formatted date
.datepicker('setDate')
Sets datepicker() to date provided. Date provided must be a valid Date object or date string.
$('#myDatepicker').datepicker('setDate', new Date());
.datepicker('getCulture')
Returns the culture the datepicker() is currently using. Only available using moment.js with langs
.datepicker('setCulture')
Updates the culture the datepicker() uses. Only available using moment.js with langs
$('#myDatepicker').datepicker('setCulture', 'fr');
.datepicker('getFormat')
Returns the format the datepicker() is currently using. Only available using moment.js with langs
.datepicker('setFormat')
Updates the format the datepicker() uses. Only available using moment.js with langs
$('#myDatepicker').datepicker('setFormat', 'L');

Events

Event Type Description
changed.fu.datepicker This event is fired when the date value has been changed by the user inputing text into the input box. Choosing the date by clicking in the datepicker will not fire this event. Arguments include event, date where date is a JavaScript Date object.
dateClicked.fu.datepicker This event is fired when a day has been selected on the calendar. Arguments include event, date where date is a JavaScript Date object.
inputParsingFailed.fu.datepicker This event is fired when an invalid date is parsed on blur of the datepicker. Arguments include event, date where date is a JavaScript Date object.
inputRestrictedDate.fu.datepicker This event is fired when an restricted date is parsed on blur of the datepicker. Arguments include event, date where date is a JavaScript Date object.

All datepicker() events are fired on the .datepicker classed element.


$('#myDatepicker').on('changed.fu.datepicker', function (evt, date) {
  // do something…
});

To listen for changes on the Date() object, you will need to combine two listeners (as shown below). The reason for this is to keep double events firing when a date is clicked (previously when a date was clicked dateClicked and changed would both fire, which was confusing to many people.


$('#myDatepicker').on('changed.fu.datepicker dateClicked.fu.datepicker', function (evt, date) {
  // do something…
});

To listen for all changes to the datepicker's input value, including setting the date to invalid values, you will need to combine two listeners:


$('#myDatepicker').on('change dateClicked.fu.datepicker', function (evt, date) {
  // do something…
});

Examples

Choose a date from a calendar dropdown, with input parsing and formatting. Works with moment.js for extended functionality.

To support various date formats around the world, datepicker() has an optional dependency on moment.js. Download moment.js (with locales).

Sample Methods

Additional functionality added to drop-down menus that enables dropup menus instead of drop-down menus based on screen position.

Add data-flip="auto" to a drop-down trigger data-toggle="drop-down". (You may need to scroll up to trigger this functionality.) Place this menu at the bottom of the screen to implement a drop-up menu.


<div class="btn-group">
	<button class="btn btn-danger" type="button">Auto-Flip Drop-down</button>
	<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown" data-flip="auto" type="button">
		<span class="caret"></span>
		<span class="sr-only">Toggle Drop-down</span>
	</button>
	<ul class="dropdown-menu" role="menu" >
		<li><a href="#">Action</a></li>
		<li><a href="#">Another action</a></li>
		<li><a href="#">Something else here</a></li>
		<li class="divider"></li>
		<li><a href="#">Separated link</a></li>
	</ul>
</div>

By default, Fuel UX automatically positions the drop-down menu 100 percent from the top and along the right side of its parent. Remove .dropdown-menu-right to a .dropdown-menu to left align the drop-down menu.

The dropdown-autoflip add-on determines whether to show a drop-down menu or a dropup menu by calculating the position on the screen and the edge of the viewport. If the positioning requires a drop-up menu, add .dropup to the .dropdown-menu element.

Markup

Add data-flip="auto" to a drop-down menu within a class="fuelux" container.


<div class="btn-group">
	<button class="btn btn-danger" type="button">Auto-Flip Drop-down</button>
	<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown" data-flip="auto" type="button">
		<span class="caret"></span>
		<span class="sr-only">Toggle Drop-down</span>
	</button>
	<ul class="dropdown-menu" role="menu" >
		...
	</ul>
</div>

Event Listeners

The auto-flip drop-down only receives events.

Event Type Description
click Receives clicks from [data-toggle=dropdown][data-flip]
suggest Fire the suggest event and pass in a drop-down menu $('#dropdownMenu').

Dropdowns dropdown.js

Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.

Within a navbar

Within pills

Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .open class on the parent list item.

On mobile devices, opening a dropdown adds a .dropdown-backdrop as a tap area for closing dropdown menus when tapping outside the menu, a requirement for proper iOS support. This means that switching from an open dropdown menu to a different dropdown menu requires an extra tap on mobile.

Note: The data-toggle="dropdown" attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.

Via data attributes

Add data-toggle="dropdown" to a link or button to toggle a dropdown.


<div class="dropdown">
  <button id="dLabel" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
    Dropdown trigger
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>

To keep URLs intact with link buttons, use the data-target attribute instead of href="#".


<div class="dropdown">
  <a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
    Dropdown trigger
    <span class="caret"></span>
  </a>

  <ul class="dropdown-menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>

Via JavaScript

Call the dropdowns via JavaScript:


$('.dropdown-toggle').dropdown()

data-toggle="dropdown" still required

Regardless of whether you call your dropdown via JavaScript or instead use the data-api, data-toggle="dropdown" is always required to be present on the dropdown's trigger element.

None

$().dropdown('toggle')

Toggles the dropdown menu of a given navbar or tabbed navigation.

All dropdown events are fired at the .dropdown-menu's parent element.

All dropdown events have a relatedTarget property, whose value is the toggling anchor element.

Event Type Description
show.bs.dropdown This event fires immediately when the show instance method is called.
shown.bs.dropdown This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete).
hide.bs.dropdown This event is fired immediately when the hide instance method has been called.
hidden.bs.dropdown This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete).

$('#myDropdown').on('show.bs.dropdown', function () {
  // do something…
})

Individual or compiled

Plugins can be included individually (using Jasny Bootstrap's individual *.js files), or all at once (using jasny-bootstrap.js or the minified jasny-bootstrap.min.js).

The Jasny Bootstrap plugins work with or without loading vanilla Bootstrap's bootstrap.js.

Do not attempt to include both.

Both jasny-bootstrap.js and jasny-bootstrap.min.js contain all plugins in a single file.

Data attributes

You can use all Jasny Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first-class API and should be your first consideration when using a plugin.

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the document namespaced with data-api. This looks like this:


$(document).off('.data-api')

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:


$(document).off('.alert.data-api')

Programmatic API

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.


$(".fileinput").fileinput().addClass("fat")

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):


$("#myMenu").offcanvas()                      // initialized with defaults
$("#myMenu").offcanvas({ autohide: false })   // initialized with no autohide
$("#myMenu").offcanvas('show')                // initializes and invokes show immediately

Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Offcanvas. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('.navmenu').data('offcanvas').

No conflict

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.


var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the Bootstrap functionality

Events

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is trigger on the completion of an action.

As of 3.1.2, all Bootstrap events are namespaced.

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.


$('#myMenu').on('show.bs.offcanvas', function (e) {
  if (!data) return e.preventDefault() // stops menu from being shown
})

Example

The offcanvas plugin allows you to hide an element from sight and than show it by moving either that or any other element. It's intended to be used for off canvas navigation, like push menus.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in aliquet nisl. Praesent sed leo congue, fringilla eros eu, tempus metus. Nam mollis odio ipsum, non vehicula ipsum accumsan sodales. Morbi varius vitae elit euismod cursus. Donec a dapibus justo, in facilisis nisi. Suspendisse ut turpis dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dui risus, tincidunt at odio ut, ultrices dignissim ipsum. Cras ultrices erat nec leo luctus varius. Nulla sollicitudin tincidunt nulla, ut porta mauris volutpat vitae. Suspendisse ornare dolor sit amet massa venenatis pulvinar.


<nav class="navmenu navmenu-default navmenu-fixed-left offcanvas" id="myNavmenu" role="navigation">
  <a class="navmenu-brand" href="#">Brand</a>
  <ul class="nav navmenu-nav">
    <li class="active"><a href="#">Home</a></li>
    <li><a href="#">Link</a></li>
    <li><a href="#">Link</a></li>
  </ul>
</nav>
<div class="navbar navbar-default navbar-fixed-top">
  <button class="navbar-toggle" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body" type="button">
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
</div>

Examples

For better understanding, have a look at the off canvas slide in menu, off canvas push menu and off canvas reveal menu exapmles.


Usage

Add .offcanvas to hide an element. Alternatively add .offcanvas-* to hide an element up to a specific viewport width. Adding the .offcanvas class is not required. You may also hide an element by any other means.

The effect works best for elements positioned to the top, bottom, left or right of the window, either with absolute or fixed positioning.

When shown, the plugin adds .canvas-slid to the element that has slid.

Via data attributes

Add data-toggle="offcanvas" and a data-target to control, assigning it to show and hide the target element. The data-target attribute accepts a CSS selector to apply the collapse to.

Optionally add a data-canvas attribute to slide a canvas instead of only the target element. For a push menu set data-canvas="body".

Via JavaScript

Call the input mask via javascript:


$('.navmenu').offcanvas()

Options

Name type default description
canvas string false If set, the canvas will be moved on show and hide instead of the target element. This creates alternative effects.
toggle boolean true Toggles the off canvas element on invocation
placement string 'auto' Where to position the element at the start of the animation. For example, if placement is "left", the element will slide from left to right. The default option "auto" guesses the placement based on position and dimension.
autohide boolean true Hide the off canvas element if clicked anywhere other that the element.
recalc boolean true Calculate if off canvas should be disabled for this viewport width on window resize. If your elements always gets hidden on window resize, try setting this to false.
disableScrolling boolean true Disable scrolling when the off canvas element is shown, by setting overflow to hidden for the body.

Graceful degradation

For browsers that don't support transform (mainly IE8), the target option is ignored. In that case, the plugin will always slide the target element. In that case .canvas-slid will be added to the target element instead.

Methods

.offcanvas(options)

Initializes the off canvas element with an optional options.

.offcanvas('toggle')

Toggles an off canvas element to shown or hidden.

.offcanvas('show')

Shows an off canvas element.

.offcanvas('hide')

Hides an off canvas element.

Events

Event Type Description
show.bs.offcanvas This event fires immediately when the show instance method is called.
shown.bs.offcanvas This event is fired when the target has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.offcanvas This event is fired immediately when the hide instance method has been called.
hidden.bs.offcanvas This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).

This plugin turns a table row into a clickable link.

NameDescriptionActions
Input maskInput masks can be used to force the user to enter data conform a specific format.
jasny.netShared knowledge of Arnold Daniels aka Jasny.
Launch modalToggle a modal via JavaScript by clicking this row.

<table class="table table-striped table-bordered table-hover">
  <thead>
    <tr><th>Name</th><th>Description</th><th>Actions</th></tr>
  </thead>
  <tbody class="rowlink" data-link="row">
    <tr><td><a href="#inputmask">Input mask</a></td><td>Input masks can be used to force the user to enter data conform a specific format.</td><td class="rowlink-skip"><a href="#">Action</a></td></tr>
    <tr><td><a href="http://www.jasny.net/" target="_blank">jasny.net</a></td><td>Shared knowledge of Arnold Daniels aka Jasny.</td><td class="rowlink-skip"><a href="#">Action</a></td></tr>
    <tr><td><a data-toggle="modal" href="#rowlinkModal">Launch modal</a></td><td>Toggle a modal via JavaScript by clicking this row.</td><td class="rowlink-skip"><a href="#">Action</a></td></tr>
  </tbody>
</table>

Via data attributes

Add class .rowlink and attribute data-link="row" to a <table> or <tbody> element. For other options append the name to data-, as in data-target="a.mainlink" A cell can be excluded by adding the .rowlink-skip class to the <td>.

Via JavaScript

Call the input mask via javascript:


$('tbody.rowlink').rowlink()

Options

Name type default description
target string 'a' A jquery selector string, to select the link element within each row.

Methods

.rowlink(options)

Makes the rows of a table or tbody clickable.

Example

Input masks can be used to force the user to enter data conform a specific format. Unlike validation, the user can't enter any other key than the ones specified by the mask.


<input class="form-control" data-mask="999-99-999-9999-9" type="text" placeholder="ISBN">

Usage

Via data attributes

Add data attributes to register an element with inputmask functionality as shown in the example above.

Via JavaScript

Call the input mask via javascript:


$('.inputmask').inputmask({
  mask: '999-99-999-9999-9'
})

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-mask="999-99-999-9999-9".

Name type default description
mask string '' A string of formatting and literal characters, defining the input mask (see below).
placeholder string '_' The character that is displayed where something needs to be typed.

Format

Each typed character needs to match exactly one character in the mask option.

CharacterDescription
9Number
aLetter
wAlphanumeric
*Any character
?Optional - any characters following will become optional

Methods

.inputmask(options)

Initializes an input element with an input mask.

Examples

The file input plugin allows you to create a visually appealing file or image input widgets.

File input widgets

Select fileChange Remove

<div class="fileinput fileinput-new input-group" data-provides="fileinput">
  <div class="form-control" data-trigger="fileinput"><i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename"></span></div>
  <span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new">Select file</span><span class="fileinput-exists">Change</span><input type="file" name="..."></span>
  <a class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput" href="#">Remove</a>
</div>
Select fileChange ×

<div class="fileinput fileinput-new" data-provides="fileinput">
  <span class="btn btn-default btn-file"><span class="fileinput-new">Select file</span><span class="fileinput-exists">Change</span><input type="file" name="..."></span>
  <span class="fileinput-filename"></span>
  <a class="close fileinput-exists" data-dismiss="fileinput" href="#" style="float: none">&times;</a>
</div>

Image upload widgets

When uploading an image, it's possible to show a thumbnail instead of the filename.

Select imageChange Remove

<div class="fileinput fileinput-new" data-provides="fileinput">
  <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
  <div>
    <span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span class="fileinput-exists">Change</span><input type="file" name="..."></span>
    <a class="btn btn-default fileinput-exists" data-dismiss="fileinput" href="#">Remove</a>
  </div>
</div>
Generic placeholder thumbnail
Select imageChange Remove

<div class="fileinput fileinput-new" data-provides="fileinput">
  <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
    <img data-src="holder.js" src="https://placehold.it/100x100" alt="...">
  </div>
  <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;"></div>
  <div>
    <span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span class="fileinput-exists">Change</span><input type="file" name="..."></span>
    <a class="btn btn-default fileinput-exists" data-dismiss="fileinput" href="#">Remove</a>
  </div>
</div>

Image preview only works in IE10+, FF3.6+, Safari6.0+, Chrome6.0+ and Opera11.1+. In older browsers the filename is shown instead.


Usage

Add .fileinput to the container. Elements inside the container with .fileinput-new and .fileinput-exists are shown or hidden based on the current state. A preview of the selected file is placed in .fileinput-preview. The text of .fileinput-filename gets set to the name of the selected file.

The file input widget should be placed in a regular <form> replacing a standard <input type="file">. The server side code should handle the file upload as normal.

Via data attributes

Add data-provides="fileinput" to the .fileinput element. Implement a button to clear the file with data-dismiss="fileinput". Add data-trigger="fileinput" to any element within the .fileinput widget to trigger the file dialog.

Via JavaScript

$('.fileinput').fileinput()

Layout

Using the given elements, you can layout the upload widget the way you want, either with a fixed width and height or with max-width and max-height.

Options

Name type description
name string Use this option instead of setting the name attribute on the <input> element to prevent it from being part of the post data when not changed.

Methods

.fileinput(options)

Initializes a file upload widget.

.fileinput('clear')

Clear the selected file.

.fileinput('reset')

Reset the form element to the original value.

Events

Event Type Description
change.bs.fileinput This event is fired after a file is selected.
clear.bs.fileinput This event is fired when the file input is cleared.
reset.bs.fileinput This event is fired when the file input is reset.

Infinite Scroll infinite-scroll.js

Turn any element into an infinite scrolling region with content that loads on demand.

Usage

Because of its dependency on a dataSource, you must initialize an infinitescroll() component via JavaScript:


$('#myInfiniteScroll').infinitescroll({
    //dataSource is required to append additional content
    dataSource: function(helpers, callback){
        //passing back more content
        callback({ content: '...' });
    }
});

Markup

Simply place class="infinitescroll" on an element of your choosing (preferably a div or span).


<div class="infinitescroll" id="myInfiniteScroll"></div>

Options

You can pass options via JavaScript at initialization.

Name type default description
dataSource function null Called whenever the user scrolls the specified percentage towards the bottom. Arguments passed include a helpers object and callback function. The helpers object contains current percentage and scrollTop values. The callback function appends more content to the element. Pass an object back within the callback function structured as follows: { content: '...' } If you append no additonal content, add the attribute end: true to that object. This code will append ''
.infinitescroll('fetchData');
Tells the infinite scrolling region to make a call to its dataSource for additional content.
$('#myInfiniteScroll').infinitescroll('fetchData');
$('#myInfiniteScroll').infinitescroll('fetchData', {force: true});
Parameter description
force Optional. Boolean dictating whether to bypass the button click in hybrid mode and immediately call dataSoruce for more content. Defaults to false

Examples

Turn any element into an infinite scrolling region with content that loads on demand.

Auto-loads content
Loads with button

<div class="fu-example section">
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-6">
        <div class="panel panel-default">
          <div class="panel-heading">Auto-loads content</div>
          <div class="panel-body">
            <div class="infinitescroll" id="myInfiniteScroll1" style="height: 200px;"></div>
          </div>
        </div>
      </div>
      <div class="col-md-6">
        <div class="panel panel-default">
          <div class="panel-heading">Loads with button</div>
          <div class="panel-body">
            <div class="infinitescroll" id="myInfiniteScroll2" style="height: 200px;"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Loader loader.js

Animation for visual indication of waiting time that can be customized to have many appearances.

Usage

Via JavaScript

Call the loader control via JavaScript:

$('#myLoader').loader();

Via data-attributes

To enable the loader control without writing JavaScript, add data-initialize="loader" to the .loader element that you wish to initialize. Such elements that exist when $.ready() executes will be initialized.

Markup

Simply place class="loader" on a div.


<div class="loader" id="myLoader" data-initialize="loader"></div>

Methods

.loader('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.loader('next');
Increments the loader animation to the next frame
.loader('pause');
Pauses the loader animation at the current frame.
.loader('play');
Plays the loader animation, resuming it if paused.
.loader('previous');
Decrements the loader animation to the previous frame.
.loader('reset');
Resets the loader animation to the beginning frame.

Examples

Animation for visual indication of waiting time that can be customized to have many appearances.


<div class="loader" data-initialize="loader"></div>

Starting frame

Use the data-frame attribute to set the initial animation frame (defaults to 1). Additionally, this attribute can be modified at any time to set the current frame.


<div class="loader" id="myLoader" data-initialize="loader" data-frame="5"></div>

Controlling speed

Use the data-delay attribute to alter animation speed (defaults to 150).


<div class="loader" id="myLoader2" data-initialize="loader" data-delay="500"></div>

Animation range

Use the data-begin and data-end attributes to control at which frames the animation begins and ends, respectively. (Defaults are 1 and 8)


<div class="loader" id="myLoader3" data-initialize="loader" data-begin="3" data-end="6"></div>

Modals modal.js

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

Multiple open modals not supported

Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

Modal markup placement

Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.

Mobile device caveats

There are some caveats regarding using modals on mobile devices. See our browser support docs for details.

Due to how HTML5 defines its semantics, the autofocus HTML attribute has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript:


$('#myModal').on('shown.bs.modal', function () {
  $('#myInput').focus()
})

Examples

Static example

A rendered modal with header, body, and set of actions in the footer.


<div class="modal fade" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Modal title</h4>
      </div>
      <div class="modal-body">
        <p>One fine body&hellip;</p>
      </div>
      <div class="modal-footer">
        <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
        <button class="btn btn-primary" type="button">Save changes</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

Live demo

Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.


<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" type="button">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
        <button class="btn btn-primary" type="button">Save changes</button>
      </div>
    </div>
  </div>
</div>

Make modals accessible

Be sure to add role="dialog" and aria-labelledby="...", referencing the modal title, to .modal, and role="document" to the .modal-dialog itself.

Additionally, you may give a description of your modal dialog with aria-describedby on .modal.

Embedding YouTube videos

Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. See this helpful Stack Overflow post for more information.

Optional sizes

Modals have two optional sizes, available via modifier classes to be placed on a .modal-dialog.


<!-- Large modal -->
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg" type="button">Large modal</button>

<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      ...
    </div>
  </div>
</div>

<!-- Small modal -->
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm" type="button">Small modal</button>

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      ...
    </div>
  </div>
</div>

Remove animation

For modals that simply appear rather than fade in to view, remove the .fade class from your modal markup.


<div class="modal" tabindex="-1" role="dialog" aria-labelledby="...">
  ...
</div>

Using the grid system

To take advantage of the Bootstrap grid system within a modal, just nest .rows within the .modal-body and then use the normal grid system classes.


<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="gridSystemModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <div class="col-md-4">.col-md-4</div>
          <div class="col-md-4 col-md-offset-4">.col-md-4 .col-md-offset-4</div>
        </div>
        <div class="row">
          <div class="col-md-3 col-md-offset-3">.col-md-3 .col-md-offset-3</div>
          <div class="col-md-2 col-md-offset-4">.col-md-2 .col-md-offset-4</div>
        </div>
        <div class="row">
          <div class="col-md-6 col-md-offset-3">.col-md-6 .col-md-offset-3</div>
        </div>
        <div class="row">
          <div class="col-sm-9">
            Level 1: .col-sm-9
            <div class="row">
              <div class="col-xs-8 col-sm-6">
                Level 2: .col-xs-8 .col-sm-6
              </div>
              <div class="col-xs-4 col-sm-6">
                Level 2: .col-xs-4 .col-sm-6
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
        <button class="btn btn-primary" type="button">Save changes</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

Have a bunch of buttons that all trigger the same modal, just with slightly different contents? Use event.relatedTarget and HTML data-* attributes (possibly via jQuery) to vary the contents of the modal depending on which button was clicked. See the Modal Events docs for details on relatedTarget,

...more buttons...

<button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" type="button" data-whatever="@mdo">Open modal for @mdo</button>
<button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" type="button" data-whatever="@fat">Open modal for @fat</button>
<button class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" type="button" data-whatever="@getbootstrap">Open modal for @getbootstrap</button>
...more buttons...

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">New message</h4>
      </div>
      <div class="modal-body">
        <form>
          <div class="form-group">
            <label class="control-label" for="recipient-name">Recipient:</label>
            <input class="form-control" id="recipient-name" type="text">
          </div>
          <div class="form-group">
            <label class="control-label" for="message-text">Message:</label>
            <textarea class="form-control" id="message-text"></textarea>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
        <button class="btn btn-primary" type="button">Send message</button>
      </div>
    </div>
  </div>
</div>

$('#exampleModal').on('show.bs.modal', function (event) {
  var button = $(event.relatedTarget) // Button that triggered the modal
  var recipient = button.data('whatever') // Extract info from data-* attributes
  // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
  // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
  var modal = $(this)
  modal.find('.modal-title').text('New message to ' + recipient)
  modal.find('.modal-body input').val(recipient)
})

Usage

The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds .modal-open to the <body> to override default scrolling behavior and generates a .modal-backdrop to provide a click area for dismissing shown modals when clicking outside the modal.

Via data attributes

Activate a modal without writing JavaScript. Set data-toggle="modal" on a controller element, like a button, along with a data-target="#foo" or href="#foo" to target a specific modal to toggle.


<button data-toggle="modal" data-target="#myModal" type="button">Launch modal</button>

Via JavaScript

Call a modal with id myModal with a single line of JavaScript:

$('#myModal').modal(options)

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-backdrop="".

Name type default description
backdrop boolean or the string 'static' true Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
keyboard boolean true Closes the modal when escape key is pressed
show boolean true Shows the modal when initialized.
remote path false

This option is deprecated since v3.3.0 and has been removed in v4. We recommend instead using client-side templating or a data binding framework, or calling jQuery.load yourself.

If a remote URL is provided, content will be loaded one time via jQuery's load method and injected into the .modal-content div. If you're using the data-api, you may alternatively use the href attribute to specify the remote source. An example of this is shown below:


<a data-toggle="modal" data-target="#modal" href="remote.html">Click me</a>

Methods

.modal(options)

Activates your content as a modal. Accepts an optional options object.


$('#myModal').modal({
  keyboard: false
})

.modal('toggle')

Manually toggles a modal. Returns to the caller before the modal has actually been shown or hidden (i.e. before the shown.bs.modal or hidden.bs.modal event occurs).

$('#myModal').modal('toggle')

.modal('show')

Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).

$('#myModal').modal('show')

.modal('hide')

Manually hides a modal. Returns to the caller before the modal has actually been hidden (i.e. before the hidden.bs.modal event occurs).

$('#myModal').modal('hide')

.modal('handleUpdate')

Readjusts the modal's positioning to counter a scrollbar in case one should appear, which would make the modal jump to the left.

Only needed when the height of the modal changes while it is open.

$('#myModal').modal('handleUpdate')

Events

Bootstrap's modal class exposes a few events for hooking into modal functionality.

All modal events are fired at the modal itself (i.e. at the <div class="modal">).

Event Type Description
show.bs.modal This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event.
shown.bs.modal This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event.
hide.bs.modal This event is fired immediately when the hide instance method has been called.
hidden.bs.modal This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).
loaded.bs.modal This event is fired when the modal has loaded content using the remote option.

$('#myModal').on('hidden.bs.modal', function (e) {
  // do something...
})

Pillbox pillbox.js

Pillbox is an interface to manage a dynamic list of tags.

  • Item 1 Remove
  • Item 2 Remove
  • Item 3 Remove
  • Item 4 Remove
  • Item 5 Remove
  • and more...

Usage

A pillbox allows user tag management enabling features such as typeahead and tag editing.

Via JavaScript

Call the Pillbox via JavaScript:

$('#myPillbox').pillbox();

Via data-attributes

The pillbox will automatically instantiate any pillboxes with data-initialize="pillbox". If the control markup is added after page load with data-initialize="pillbox", this control will be initialized on mousedown.

Markup

Add class="pillbox" to a div within a class="fuelux" container.


<div class="pillbox" id="myPillbox" data-initialize="pillbox">
  <ul class="clearfix pill-group">
    <li class="btn btn-default pill" data-value="foo">
      <span>Item Title</span>
      <span class="glyphicon glyphicon-close">
        <span class="sr-only">Remove</span>
      </span>
    </li>
    ....
    <li class="pillbox-input-wrap btn-group">
      <a class="pillbox-more">and <span class="pillbox-more-count"></span> more...</a>
      <input class="form-control dropdown-toggle pillbox-add-item" type="text" placeholder="add item">
      <button class="dropdown-toggle sr-only" type="button">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
      </button>
      <ul class="suggest dropdown-menu" data-toggle="dropdown" data-flip="auto" role="menu"></ul>
    </li>
  </ul>
</div>

Methods

.pillbox('addItems')
Adds Items to the pillbox programmatically.

$('#myPillbox').pillbox('addItems', index, [{ text: '', value: '', attr: {}, data: {} }]);
Parameter Description
index The position where to start inserting pill(s). First pane is at position 1. If omitted, or if -1 is used, the item will be appended to end of the list of pills.
[item1, ..., itemX]
item1, ..., itemX
An array or list of pill objects to be added at the index. See the following table for an overview of the pill object.
Pill object key Type Description
text string Required. Text of pillbox
value string A value stored in the data-value of the pill markup and returned with events
attr object Unless it is a reserved key in this table, child keys will be added as attributes to .pill.
attr.cssClass string CSS classes that will be added to .pill
data object An object of key/value pairs that can be stored in the jQuery data of a pill
.pillbox('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.pillbox('removeItems')
Removes all items from the pillbox.
$('#myPillbox').pillbox('removeItems');
Remove one or more items at a specific position in the pillbox by passing optional parameters. The first parameter is a 1 based index that represent the location of the first element to be removed. The second parameter is the number of items that will be removed.
$('#myPillbox').pillbox('removeItems', index, count);
.pillbox('items')
Returns an array of objects, one per item, each containing the jQuery data() contents of the item which includes data-* attributes plus a text property with the label's visible text.
.pillbox('itemCount')
Returns an integer representing the current number of items.
.pillbox('readonly')
Enables or disables readonly mode for the pillbox.
.pillbox('removeBySelector')
Removes an item based on a jQuery selector.
$('#myPillbox').pillbox('removeBySelector', 'li[data-value=buzz]');
.pillbox('removeByText')
Removes an item with contained text matching that of the provided text string parameter.
$('#myPillbox').pillbox('removeByText', "Item 4");
.pillbox('removeByValue')
Removes an item with value matching that of the provided value string parameter. The item has to have a .data-value="{value}" attribute
$('#myPillbox').pillbox('removeByValue', '1');

Options

Control options below can only be set via JavaScript. Values needed to identify which pill caused an event should be stored in data-attributes within the .pill element, as in data-value="".

Name type default description
acceptKeyCodes array [13, 188] Key codes for keys that trigger an add pill event. Default keys 13 (for enter) and 188 (for comma).
edit boolean false Enables user edited pills.
onAdd function undefined A callback function that executes when a pill is added. function(data,callback){} The data parameter contains an array of the elements being added. The callback parameter is a function that provides asynchronous support for the add functionality. In order for items to be added, the callback must be run and provided an array of items to be added. If you would like to not modify the list of items to be added, provide data as the parameter for the callback function, callback(data).
onRemove function undefined Function that runs when a pill is removed. function(data,callback){} The data parameter contains an array of the elements being removed. The callback parameter is a function that provides asynchronous support for the remove functionality. In order for items to be removed, the callback must be run and provided an array of items to be removed. If you would not like to modify the list of items to be removed, provide data as the parameter for the callback function, callback(data).
onKeyDown function undefined Function that executes when a keydown event is triggered. function(event,data,callback){} The event parameter contains the event object. The data parameter contains an array of the elements being removed. The callback parameter is a function that provides asynchronous support for the typeahead functionality. The callback function must be run in order for the typeahead dropdown with values. Provided the callback with an array of items to display in the typeahead dropdown.

callback({data:[
  {
    text: '',
    value:''
  }]
});
readonly boolean or -1 -1 Specifies whether the control is in readonly mode. If set to true, the pillbox disables user capacity to add / edit pills. A -1 value means it will check for the presence of the data-readonly="readonly" attribute, and if found initialize in readonly mode.
truncate boolean false When in readonly mode, this option will display only the number of pills that fit within the pillbox main container, with a message indicating the number of hidden items. The message content that appears is found inside the element with class pillbox-more.

Events

Event Type Description
clicked.fu.pillbox This event is triggered when a pill is clicked. A jQuery data() object with information about the clicked pill is returned.
added.fu.pillbox This event is triggered when a pill is added. A jQuery data() object with information about the added pill is returned.
removed.fu.pillbox This event is triggered when a pill is removed. A jQuery data() object with information about the removed pill is returned.
edited.fu.pillbox This event is triggered when a pill is edited. A jQuery data() object with information about the edited pill is returned.

All pillbox events are fired on the .pillbox classed element.


$('#myPillbox').on('clicked.fu.pillbox', function (evt, item) {
  // do something
});

Fuel UX Dependencies

Example

Pillbox is an interface to manage a list of tags. Wrap the list of tags (pills) within .fuelux .pillbox

  • Item 1 Remove
  • Item 2 Remove
  • Item 3 Remove
  • Item 4 Remove
  • Item 5 Remove
  • and more...
Sample Methods

Placard placard.js

Adds a pop-up element to inputs/textareas on focus with additional options for explicit accept/cancel actions.

Usage

Via JavaScript

Call the placard control via JavaScript:

$('#myPlacard').placard();

Via data-attributes

The placard will automatically instantiate any placard with data-initialize="placard". If you add the control markup after page load with data-initialize="placard", the control will initialize on focus.

Markup

Use the following markup for a simple input OR textarea OR contenteditable div placard:


<div class="placard" id="myPlacard" data-initialize="placard">
  <div class="placard-popup"></div>
  <input class="form-control placard-field" type="text"/>
</div>

<div class="placard" id="myPlacard2" data-initialize="placard">
  <div class="placard-popup"></div>
  <textarea class="form-control placard-field"></textarea>
</div>

<div class="placard" id="myPlacard3" data-initialize="placard">
  <div class="placard-popup"></div>
  <div class="form-control placard-field" contenteditable="true"></div>
</div>

For header and footer content, use the following input OR textarea OR contenteditable div placards:


<div class="placard" id="myPlacard4" data-initialize="placard">
  <div class="placard-popup"></div>
  <div class="placard-header"><h5>Header</h5></div>
  <input class="form-control placard-field" type="text"/>
  <div class="placard-footer">
    <a class="placard-cancel" href="#">Cancel</a>
    <button class="btn btn-primary btn-xs placard-accept" type="button">Save</button>
  </div>
</div>

<div class="placard" id="myPlacard5" data-initialize="placard">
  <div class="placard-popup"></div>
  <div class="placard-header"><h5>Header</h5></div>
  <textarea class="form-control placard-field"></textarea>
  <div class="placard-footer">
    <a class="placard-cancel" href="#">Cancel</a>
    <button class="btn btn-primary btn-xs placard-accept" type="button">Save</button>
  </div>
</div>

<div class="placard" id="myPlacard6" data-initialize="placard">
  <div class="placard-popup"></div>
  <div class="placard-header"><h5>Header</h5></div>
  <div class="form-control placard-field" contenteditable="true"></div>
  <div class="placard-footer">
    <a class="placard-cancel" href="#">Cancel</a>
    <button class="btn btn-primary btn-xs placard-accept" type="button">Save</button>
  </div>
</div>

Optional data-attributes

  • Add data-ellipsis="true" to the placard element to enable ellipsis on the placard-field. Inputs and regular contenteditable divs use CSS. JavaScript is used to enable ellipsis for textareas and contenteditable divs with data-textarea="true". Use the .('getValue'); and .('setValue'); methods to retrieve or set values for placards with ellipsis enabled to avoid incorrect values. Be warned: performance drops with large fields for the JavaScript solution when ellipsis is enabled.
  • Add data-textarea="true" to the .placard-field element if using a contenteditable div to make that element look and behave more like a textarea.

Glass styling

Add the glass class to the input, textarea, or contenteditable div with class placard-field for a field with minimalistic chrome unless hovered upon or clicked.

Options

You can pass options via JavaScript upon initialization.

Name type default description
explicit boolean false Requires the user explicitly select 'accept' or 'cancel' before the placard is dismissed.
externalClickAction string cancel Specifies what action occurs on an external click (click outside the placard element).
externalClickExceptions array [ ] Array of jQuery selector strings. Anything that matches the selector (searched globally) will not count as an external click. Allows other items to be clicked without dismissing the placard.
onAccept function undefined Call this function when the user indicates they want to 'accept' changes. Passes a helpers object containing previousValue and current value as an argument. The default accept behaviors will not occur, so you can determine what happens next. Useful for validation purposes.
onCancel function undefined Call this function when the user indicates they want to 'cancel' changes. Passes a helpers object containing previousValue and current value as an argument. The default cancel behaviors will not occur, so you can determine what happens next. Useful for validation purposes.
revertOnCancel boolean OR number -1 Dictates whether the placard reverts the entered value when a 'cancel' action occurs. -1 checks for a '.placard-accept' element on initialization, setting this value to true if present. Also accepts true or false values.

Methods

.placard('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup
.placard('disable')
Ensures the placard is disabled, preventing users from manipulating the placard value.
.placard('enable')
Ensures the placard is enabled, allowing users to manipulate the placard value.
.placard('getValue');
Gets the current actual placard value
.placard('hide');
Hides the placard pop-up
.placard('setValue');
Sets the current actual placard value
$('#myPlacard').placard('setValue', 'foxen');
Parameter description
value Required. String or number used to set the placard value.
.placard('show');
Shows the placard pop-up.

Events

Event Type Description
accepted.fu.placard Fires when the user indicates the desire to 'accept' changes. This event fires after the onAccept function, if defined.
canceled.fu.placard Fires when the user indicates the desire to 'cancel' changes. This event fires after the onCancel function, if defined.
hidden.fu.placard Fires when you dismiss the placard and the popup disappears.
shown.fu.placard Fires when the placard obtains focus and the popup appears.

All placard events are fired on the .placard classed element.


$('#myPlacard').on('accepted.fu.placard', function () {
  // do something…
});

Examples

Adds a pop-up element to inputs/textareas/contenteditable-divs on focus with additional options for explicit accept/cancel actions.

On an input
With .placard-header and .placard-footer option.
Field label
With the .glass option on .placard-field
Field label
Sample Methods

Popovers popover.js

Add small overlays of content, like those on the iPad, to any element for housing secondary information.

Popovers whose both title and content are zero-length are never displayed.

Plugin dependency

Popovers require the tooltip plugin to be included in your version of Bootstrap.

Opt-in functionality

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

One way to initialize all popovers on a page would be to select them by their data-toggle attribute:


$(function () {
  $('[data-toggle="popover"]').popover()
})

Popovers in button groups, input groups, and tables require special setting

When using popovers on elements within a .btn-group or an .input-group, or on table-related elements (<td>, <th>, <tr>, <thead>, <tbody>, <tfoot>), you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).

Don't try to show popovers on hidden elements

Invoking $(...).popover('show') when the target element is display: none; will cause the popover to be incorrectly positioned.

Popovers on disabled elements require wrapper elements

To add a popover to a disabled or .disabled element, put the element inside of a <div> and apply the popover to that <div> instead.

Multiple-line links

Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add white-space: nowrap; to your anchors to avoid this.

Examples

Static popover

Four options are available: top, right, bottom, and left aligned.

Popover top

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover right

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover bottom

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Popover left

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

Live demo


<button class="btn btn-lg btn-danger" data-toggle="popover" type="button" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>

Four directions


<button class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." type="button">
  Popover on left
</button>

<button class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." type="button">
  Popover on top
</button>

<button class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus." type="button">
  Popover on bottom
</button>

<button class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." type="button">
  Popover on right
</button>

Dismiss on next click

Use the focus trigger to dismiss popovers on the next click that the user makes.

Specific markup required for dismiss-on-next-click

For proper cross-browser and cross-platform behavior, you must use the <a> tag, not the <button> tag, and you also must include the role="button" and tabindex attributes.


<a class="btn btn-lg btn-danger" data-toggle="popover" data-trigger="focus" tabindex="0" role="button" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>

Usage

Enable popovers via JavaScript:

$('#example').popover(options)

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

Name Type Default Description
animation boolean true Apply a CSS fade transition to the popover
container string | false false

Appends the popover to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.

content string | function ''

Default content value if data-content attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the popover is attached to.

delay number | object 0

Delay showing and hiding the popover (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { "show": 500, "hide": 100 }

html boolean false Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
placement string | function 'right'

How to position the popover - top | bottom | left | right | auto.
When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.

When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the popover instance.

selector string false If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See this and an informative example.
template string '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'

Base HTML to use when creating the popover.

The popover's title will be injected into the .popover-title.

The popover's content will be injected into the .popover-content.

.arrow will become the popover's arrow.

The outermost wrapper element should have the .popover class.

title string | function ''

Default title value if title attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the popover is attached to.

trigger string 'click' How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. manual cannot be combined with any other trigger.
viewport string | object | function { selector: 'body', padding: 0 }

Keeps the popover within the bounds of this element. Example: viewport: '#viewport' or { "selector": "#viewport", "padding": 0 }

If a function is given, it is called with the triggering element DOM node as its only argument. The this context is set to the popover instance.

Data attributes for individual popovers

Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.

Methods

$().popover(options)

Initializes popovers for an element collection.

.popover('show')

Reveals an element's popover. Returns to the caller before the popover has actually been shown (i.e. before the shown.bs.popover event occurs). This is considered a "manual" triggering of the popover. Popovers whose both title and content are zero-length are never displayed.

$('#element').popover('show')

.popover('hide')

Hides an element's popover. Returns to the caller before the popover has actually been hidden (i.e. before the hidden.bs.popover event occurs). This is considered a "manual" triggering of the popover.

$('#element').popover('hide')

.popover('toggle')

Toggles an element's popover. Returns to the caller before the popover has actually been shown or hidden (i.e. before the shown.bs.popover or hidden.bs.popover event occurs). This is considered a "manual" triggering of the popover.

$('#element').popover('toggle')

.popover('destroy')

Hides and destroys an element's popover. Popovers that use delegation (which are created using the selector option) cannot be individually destroyed on descendant trigger elements.

$('#element').popover('destroy')

Events

Event Type Description
show.bs.popover This event fires immediately when the show instance method is called.
shown.bs.popover This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.popover This event is fired immediately when the hide instance method has been called.
hidden.bs.popover This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).
inserted.bs.popover This event is fired after the show.bs.popover event when the popover template has been added to the DOM.

$('#myPopover').on('hidden.bs.popover', function () {
  // do something…
})

Radio radio.js

The radio control provides a customized look and feel that can be standardized across all browsers.

Usage

Via JavaScript

Call the radio control via JavaScript on the label. The div.radio container is only present for block level stying:

$('#myRadioLabel').radio();

Via data-attributes

The radio will automatically instantiate any radios with data-initialize="radio" located on the <label>. If you add the control markup after page load with data-initialize="radio", this control initializes on mouseover.

Deprecated radio button markup

Before v3.7.0, the radio control could be bound with $().radio(); or data-initialize="radio" to the div.radio or the input elements. This is no longer supported. Please update your markup and JavaScript to be bound to the label only.

Methods

.radio('check')
Ensures the radio is checked
.radio('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.radio('disable')
Ensures the radio is disabled
.radio('enable')
Ensures the radio is enabled
.radio('isChecked')
Returns true or false indicating the radio's checked state
.radio('uncheck')
Ensures the radio is not checked

Examples

Customized look and feel for radio button element

Default (stacked)


<div class="radio">
  <label class="radio-custom" id="myCustomRadioLabel" data-initialize="radio">
    <input class="sr-only" name="radioEx1" type="radio" value="option1">
    Browser-independent radio unchecked on page load
  </label>
</div>

<div class="radio checked">
  <label class="radio-custom" id="myCustomRadioLabel2" data-initialize="radio">
    <input class="sr-only" name="radioEx1" checked="checked" type="radio" value="option2">
    Browser-independent radio checked on page load
  </label>
</div>

<div class="radio checked">
  <label class="radio-custom disabled" id="myCustomRadioLabel3" data-initialize="radio">
    <input class="sr-only" name="radio1b" checked="checked" disabled="disabled" type="radio">
    <span class="radio-label">Disabled custom appearance radio selected on page load</span>
  </label>
</div>

<div class="radio">
  <label class="radio-custom disabled" id="myCustomRadioLabel4" data-initialize="radio">
    <input class="sr-only" name="radioEx2" disabled="disabled" type="radio" value="option3">
    Disabled browser-independent radio unchecked on page load
  </label>
</div>

Inline radio

Use the .radio-inline classes on radios for controls that appear on the same line.


<label class="radio-custom radio-inline" id="myCustomRadioLabel5" data-initialize="radio">
  <input class="sr-only" name="radioEx2" type="radio" value="option1"> 1
</label>
<label class="radio-custom radio-inline" id="myCustomRadioLabel6" data-initialize="radio">
  <input class="sr-only" name="radioEx2" checked="checked" type="radio" value="option2"> 2
</label>
<label class="radio-custom radio-inline disabled" id="myCustomRadioLabel7" data-initialize="radio">
  <input class="sr-only" name="radioEx2" disabled="disabled" type="radio" value="option3"> 3
</label>

Addon radios

Place any radio option within an input group's addon instead of text.


  <div class="input-group">
    <label class="input-group-addon radio-custom radio-inline" data-initialize="radio">
      <input class="sr-only" type="radio" value="option1">
    </label>
    <input class="form-control" type="text">
  </div>

Element toggling radios

Use the data-toggle="{{selector}}" to automatically show or hide elements matching the selector within the body upon check or uncheck. This function works with any jQuery selector.

ID-toggling container
Class-toggling container
Class-toggling container

<div class="radio">
  <label class="radio-custom" id="myCustomRadioLabel8" data-initialize="radio">
    <input class="sr-only" name="radioEx3" data-toggle="#radioToggleID" type="radio" value="option1">
    Toggles element with matching ID
  </label>
</div>
<label class="radio-custom radio-inline" id="myCustomRadioLabel9" data-initialize="radio">
  <input class="sr-only" name="radioEx3" data-toggle=".radioToggleCLASS" type="radio" value="option1">
  Toggles elements with matching class
</label>


<div class="alert bg-info" id="radioToggleID">ID-toggling container</div>
<div class="alert bg-success radioToggleCLASS">Class-toggling container</div>
<div class="alert bg-success radioToggleCLASS">Class-toggling container</div>

Highlighting radios

Use the .highlight class to add a background highlight upon check.


<div class="radio highlight" id="myCustomRadioLabel10">
  <label class="radio-custom highlight" data-initialize="radio">
    <input class="sr-only" name="radioEx4" type="radio" value="option1">
    This block-level radio will highlight on check.
  </label>
</div>
<label class="radio-custom radio-inline highlight" id="myCustomRadio11" data-initialize="radio">
  <input class="sr-only" name="radioEx4" type="radio" value="option2">
  This inline radio will highlight on check.
</label>
  

Repeater List View repeater-list.js

The repeater list view plug-in will render data in a tabular format, with many options and methods to suit your needs.

Example

Usage

The repeater list plug-in extends repeater functionality. This plug-in follows the steps specified in the repeater docs. You can also use the following additional features:

Data Source

The dataSource function behaves as described in the repeater docs. However, the function potentially provides a few additional attributes in the options argument:

Attribute type description
sortDirection string If the list view is sortable and has been sorted by the user, this will indicate the sort direction. Values are either 'asc' or 'desc'.
sortProperty string If the list view is sortable and has been sorted by the user, this will indicate the column property that has been sorted on.

Additionally, the function requires a few additional parameters on the returned data object to render the data properly:

Attribute type description
columns array Array of objects representing the desired columns within the rendered list. The column objects contain three attributes:
  • className - String representing the classes to be added to any DOM items associated with the column. Multiple classes can be adding a space between each name
  • label - String or jQuery attribute containing the content to be displayed as the "name" of the column
  • property - String value that dictates which item attribute is displayed within the column
  • sortable - Optional Boolean or string value dictating whether user can sort the column. A true value indicates sorting on the property value. A string value sorts on the specified value. This attribute defaults to false
  • sortDirection - Optional string to set initial sort direction of the column. Values can be either 'asc' or 'desc'. NOTE: only one column can be sorted upon at a time.
  • width - String or Number dictating this column's width
(ex: [ { label: 'Name', property: 'name', sortable: true }, ... ] )
items array Array of objects representing the item data that will be displayed within the repeater. The item objects can contain any number of attributes. The attribute name must match the column property value to display within a column.

Options

You can pass options via Javascript upon initialization.

Name type default description
list_actions object null Can be used to configure an additional actions column in the repeater. It will positioned as the rightmost column and will always be visible. It creates a dropdown menu that can be populated with x number of actions to be applied to the row. If multi select is also enabled will allow for bulk actions.
  • width - optional width to the actions column
  • items - Array of objects representing the different action items in the dropdown
    • name - String representing the name of the action
    • html - HTML string that would modify the markup of the action item
    • clickAction - returns a helpers obj once this action item has been clicked
      • helpers returns an object that contains helpers.item which is the jquery element of the current table row. Also returns helpers.rowData which are all key/value data from the current item/row in the dataSource

list_actions:  {
  width: 37,
  items: [{
    name: 'delete'
	html: ' Delete',
	clickAction: function(helpers, callback, e) {
		e.preventDefaul();
		console.log('hey it worked');
		console.log(helpers);
		console.log(e);
		callback();
	}
}
list_columnRendered function null If set, the repeater calls this function after rendering each table cell within a row. It passes a helpers object and a callback function as arguments. This function is the preferred way to modify table cell markup.
  • helpers.rowData - All key/value data from the current item/row in the dataSource
  • helpers.columnAttr - The key name specified by dataSource.columns of the current column/cell
  • helpers.container - jQuery element of the current tr or table row
  • helpers.item - jQuery element of the current td or table cell
  • callback - Call this function to continue rendering the view
list_columnSizing boolean true Dictates whether the repeater should run the intelligent column resizing algorithm. This feature only resizes columns without a set value. Setting this value to false will disable this feature entirely.
list_columnSyncing boolean true Dictates whether the repeater should run the post-render column syncing algorithm. This feature keeps the `.repeater-list-heading` classed divs in alignment with the columns. Setting this value to false will disable this feature entirely.
list_frozenColumns number 0 Dictates whether the repeater should create frozen columns in the repeater. This feature creates x number of frozen columns on the left side of the repeater. Frozen columns means that when scrolled left to right these columns will not move and always be visible.
list_infiniteScroll boolean or object false Dictates whether the repeater list view should utilize infinite scrolling instead of pagination. A true value enables infinite scrolling with default settings. Additionally, you can set this value to an object with attributes matching the options available in the infinite scroll control. This option allows for further customization and ignores the dataSource option.
list_noItemsHTML string or jQuery object '' Specifies what is displayed if no items return from the dataSource. You can use a string or jQuery object.
list_selectable boolean or string false Specifies whether a user can select rendered item rows. If you set the value to true, users can select only one row at a time. If you set the value to 'multi', users can select multiple rows at once.
list_sortClearing boolean false Specifies whether users can clear sortable columns with a third click:
  • one click, sort ASC.
  • second click, sort DESC
  • third click, no sorting
list_rowRendered function null If set, the repeater calls this function after the repeater renders each row, passing a helpers object and callback function as arguments. This function is the preferred way to modify table row markup.
  • helpers.rowData - All key/value data from the current item/row in the dataSource
  • helpers.container - jQuery element of the row's parent (tbody)
  • helpers.item - jQuery element of the current tr or table row
  • callback - Call this function to continue rendering the view
list_highlightSortedColumn boolean true Specifies whether sorted columns should be highlighted.

Methods

.repeater('list_clearSelectedItems');

Clears any currently selected row items. You can use selectable row items only by enabling the list_selectable option.

$('#myRepeater').repeater('list_clearSelectedItems');

.repeater('list_getSelectedItems');

Returns the currently selected row items in an array. You can use selectable row items only by enabling the list_selectable option.

$('#element').repeater('list_getSelectedItems');

.repeater('list_setSelectedItems');

Set the selected row items for the current displayed data. This function accepts an array of items objects and force boolean as arguments.

$('#myRepeater').repeater('list_setSelectedItems', [ {...}, ...]);
Parameter description
items Required Array of items objects. The items objects specify which item to select with attributes to identify the item. If the items object contains an index property, that items object will select the matching item index within the currently displayed data. If the items object contains a property attribute and value attribute, that items object will select items with properties matching the specified value.
(ex: [ { index: 4 }, { property: 'name', value: 'nameValue' } ] )
force Optional Boolean specifying whether to ignore current list_selectable mode when selecting items. This value defaults to false and allows only one selectable item if list_selectable does not equal multi, regardless of how many items are passed into the items array parameter. Set the value to true to override this behavior and select all provided items.

Events

Event Type Description
deselected.fu.repeaterList If list_selectable is enabled, fires whenever the user deselects a row. Provides an event object and the deselected row as arguments.
selected.fu.repeaterList If list_selectable is enabled, fires whenever the user selects a row. Provides an event object and the selected row as arguments.

All repeater-list events are fired on the .repeater classed element.


$('#myRepeater').on('selected.fu.repeaterList', function () {
    // do something…
});

Repeater Thumbnail View repeater-thumbnail.js

The repeater thumbnail view plug-in will render data in customizable thumbnails, with many options and methods to suit your needs.

Example

Usage

The repeater thumbnail plug-in extends repeater functionality. This plug-in follows the steps specified in the repeater docs. You can also use the following additional features:

Data Source

The dataSource function behaves as described in the repeater docs. However, the function requires a few additional parameters on the returned data object to render the data properly:

Attribute type description
items array Array of objects representing the thumbnails that will be displayed within the repeater. The item objects can contain any number of attributes, although attributes with certain names will be used to render the thumbnail. In the default thumbnail template, the `src` and `name` attributes are expected.

Options

You can pass options via Javascript upon initialization.

Name type default description
thumbnail_alignment string 'justify' Specifies the alignment of rendered thumbnails. The options for the alignment of thumbnails include 'left', 'center', 'justify', 'right' or 'none'
thumbnail_infiniteScroll boolean or object false Dictates whether the repeater thumbnail view should utilize infinite scrolling instead of pagination. A true value enables infinite scrolling with default settings. Additionally, you can set this value to an object with attributes matching the options available in the infinite scroll control. This option allows for further customization and ignores the dataSource option.
thumbnail_itemRendered function null The repeater calls this function after the repeater renders each item, passing a a helpers object and callback function as arguments. The helpers object includes itemData, parent container, and current thumbnail item as attributes, if available. Once ready, call the callback function in order to continue with rendering.
thumbnail_selectable boolean or string false Specifies whether a user can select rendered thumbnails. If you set the value to true, users can select only one thumbnail at a time. If you set the value to 'multi', users can select multiple thumbnails at once.
thumbnail_template string

<div class="thumbnail repeater-thumbnail"><img height="75" src="{% raw %}{{src}}{% endraw %}" width="65"><span>{% raw %}{{name}}{% endraw %}</span></div>
Dictates the template used to render the repeater thumbnails. Mustache/Handlebar-style syntax ('{% raw %}{{example}}{% endraw %}') can be used to specify where various attribute values will be inserted. NOTE: only the immediate decendents of the thumbnail item object can be referenced; all other Mustache/Handlebars functionality not supported.

Methods

.repeater('thumbnail_clearSelectedItems');

Clears any currently selected thumbnail items. You can use selectable thumbnail items only by enabling the thumbnail_selectable option.

$('#myRepeater').repeater('thumbnail_clearSelectedItems');

.repeater('thumbnail_getSelectedItems');

Returns the currently selected thumbnail items in an array. You can use selectable thumbnail items only by enabling the thumbnail_selectable option.

$('#element').repeater('thumbnail_getSelectedItems');

.repeater('thumbnail_setSelectedItems');

Set the selected thumbnail items for the current displayed data. This function accepts an array of items objects and force boolean as arguments.

$('#myRepeater').repeater('thumbnail_setSelectedItems', [ {...}, ...]);
Parameter description
items Required Array of items objects. The items objects specify which thumbnails to select with attributes to identify the item. If the items object contains an index property, the method will select the matching thumbnail index within the currently displayed data. If the items object contains a selector property, the method will select any thumbnails matching that selector.
(ex: [ { index: 4 }, { selector: '.coolThumbnail' } ] )
force Optional Boolean specifying whether to ignore current thumbnail_selectable mode when selecting items. This value defaults to false and allows only one selectable item if thumbnail_selectable does not equal 'multi', regardless of how many items are passed into the items array parameter. Set the value to true to override this behavior and select all provided items.

Events

Event Type Description
deselected.fu.repeaterThumbnail If thumbnail_selectable is enabled, fires whenever the user deselects a thumbnail. Provides an event object and the deselected thumbnail as arguments.
selected.fu.repeaterThumbnail If thumbnail_selectable is enabled, fires whenever the user selects a thumbnail. Provides an event object and the selected thumbnail as arguments.

All repeater-thumbnail events are fired on the .repeater classed element.


$('#myRepeater').on('selected.fu.repeaterThumbnail', function () {
    // do something…
});

Repeater repeater.js

Data viewer with paging, sorting, and searching. Must use at least one extension to display items. Fuel UX bundles a list view extension and thumbnail view extension, but you can build your own. The following example uses the list and thumbnail extensions.

Usage

Because of its reliance upon a dataSource, you must initialize a repeater() via JavaScript:


  dataSource = function(options, callback){
    //...
  };

  $('#myRepeater').repeater({dataSource: dataSource});

Markup

Use the following markup to setup the repeater:


  <div class="repeater" id="myRepeater">
    <div class="repeater-header">
      <div class="repeater-header-left">
        <span class="repeater-title">Awesome Repeater</span>
        <div class="repeater-search">
          <div class="search input-group">
            <input class="form-control" type="search" placeholder="Search"/>
            <span class="input-group-btn">
              <button class="btn btn-default" type="button">
                <span class="glyphicon glyphicon-search"></span>
                <span class="sr-only">Search</span>
              </button>
            </span>
          </div>
        </div>
      </div>
      <div class="repeater-header-right">
        <div class="btn-group selectlist repeater-filters" data-resize="auto">
          <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
            <span class="selected-label">&nbsp;</span>
            <span class="caret"></span>
            <span class="sr-only">Toggle Filters</span>
          </button>
          <ul class="dropdown-menu" role="menu">
            <li data-value="all" data-selected="true"><a href="#">all</a></li>
            <li data-value="some"><a href="#">some</a></li>
            <li data-value="others"><a href="#">others</a></li>
          </ul>
          <input class="hidden hidden-field" name="filterSelection" readonly="readonly" aria-hidden="true" type="text"/>
        </div>
        <div class="btn-group repeater-views" data-toggle="buttons">
          <label class="btn btn-default active">
            <input name="repeaterViews" type="radio" value="list"><span class="glyphicon glyphicon-list"></span>
          </label>
          <label class="btn btn-default">
            <input name="repeaterViews" type="radio" value="thumbnail"><span class="glyphicon glyphicon-th"></span>
          </label>
        </div>
      </div>
    </div>
    <div class="repeater-viewport">
      <div class="repeater-canvas"></div>
      <div class="loader repeater-loader"></div>
    </div>
    <div class="repeater-footer">
      <div class="repeater-footer-left">
        <div class="repeater-itemization">
          <span><span class="repeater-start"></span> - <span class="repeater-end"></span> of <span class="repeater-count"></span> items</span>
          <div class="btn-group selectlist" data-resize="auto">
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
              <span class="selected-label">&nbsp;</span>
              <span class="caret"></span>
              <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" role="menu">
              <li data-value="5"><a href="#">5</a></li>
              <li data-value="10" data-selected="true"><a href="#">10</a></li>
              <li data-value="20"><a href="#">20</a></li>
              <li data-value="50" data-foo="bar" data-fizz="buzz"><a href="#">50</a></li>
              <li data-value="100"><a href="#">100</a></li>
            </ul>
            <input class="hidden hidden-field" name="itemsPerPage" readonly="readonly" aria-hidden="true" type="text"/>
          </div>
          <span>Per Page</span>
        </div>
      </div>
      <div class="repeater-footer-right">
        <div class="repeater-pagination">
          <button class="btn btn-default btn-sm repeater-prev" type="button">
            <span class="glyphicon glyphicon-chevron-left"></span>
            <span class="sr-only">Previous Page</span>
          </button>
          <label class="page-label" id="myPageLabel">Page</label>
          <div class="repeater-primaryPaging active">
            <div class="input-group input-append dropdown combobox">
              <input class="form-control" type="text" aria-labelledby="myPageLabel">
              <div class="input-group-btn">
                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                  <span class="caret"></span>
                  <span class="sr-only">Toggle Dropdown</span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right"></ul>
              </div>
            </div>
          </div>
          <input class="form-control repeater-secondaryPaging" type="text" aria-labelledby="myPageLabel">
          <span>of <span class="repeater-pages"></span></span>
          <button class="btn btn-default btn-sm repeater-next" type="button">
            <span class="glyphicon glyphicon-chevron-right"></span>
            <span class="sr-only">Next Page</span>
          </button>
        </div>
      </div>
    </div>
  </div>
  

Optional data attributes

The repeater must be initialized via JavaScript, however it also accepts some optional data-attributes.

data-staticheight="true"
enables staticHeight on initialization.

Options

Pass options via JavaScript upon initialization.

Name type default description
dataSource function empty function Use this function to provide paging information and data for the repeater. Call this function prior to rendering the current view, passing a options object and callback function. Run the callback function once you gather the appropriate information to complete the rendering. Review more details on using dataSource below.
dataSourceOptions object null Use this object to pass a parameter to a custom-defined dataSource function mentioned above. Then, use those values to customize the data that gets passed back into the repeater from your API. Suggested uses include sorting, filtering, and search values. This object is also valuable in custom renders when used as an object within the render methods's options parameter. Did you lose your custom dataSourceOptions when you changed the page within repeater? If you did, set preserveDataSourceOptions to true in order to keep them.
defaultView string or number -1 Specifies the initial view the repeater will render (usually a string value equivalent to the desired repeater view extension). If set to -1, the repeater will check the .repeater-views button group for an .active class, using its input value as the defaultView setting.
dropPagingCap number 10 Specifies the number of items allowed within the .repeater-primaryPaging drop-down menu. If the number of pages exceeds this amount, the code will use the .repeater-secondaryPaging input.
preserveDataSourceOptions boolean false Sets whether defineddataSourceOptions get preserved or reset when the dataSource is called. For example, the dataSource function is called when navigating to another page. If you would like to keep previously defined settings such as search or filtering, then set to true. Setting to true is generally recommended when using dataSourceOptions to manipulate your data.
staticHeight boolean or number -1
  • If true; height of CSS styles applied to repeater element will be used
  • If a positive number; that value will be used as height in pixels
  • If -1; value of data-staticheight attribute will be used if present
  • If false; height will be fluid, not static. Meaning reapeater contents will not be scrollable, and container must be big enough to show everything. Similar to CSS overflow: hidden.
views object null Can be optionally used to configure multiple views, including those of the same view type (2 'list' views, 2 'thumbnail' views, etc) To utilize, first set the input values within .repeater-views to their appropriate view names. For multiple views of the same type, use the . operator as a separator, following the syntax [viewType].[viewName] (Ex: "list.view1") Then, within the views option object, add these view names as attributes. Each attribute can be an object, with it's own view plugin / repeater configuration. This configuration will then be honored by the repeater per view. Example:

$('#myRepeater').repeater({
  views: {
    'list.view1': {
      dropPagingCap: 20,
      list_infiniteScroll: true,
      list_selectable: 'multi'
    },
    'list.view2': {
      dataSource: function(options, callback){ ... },
      dropPagingCap: 30,
      list_selectable: true
    }
  },
  ...
});

Methods

.repeater('clear');
Clears the repeater of current data. Accepts an optional options object.
$('#myRepeater').repeater('clear');
$('#myRepeater').repeater('clear', {preserve: true});
Attribute type description
clearInfinite boolean optional -- if true, preserve must also be set to true to have an effect. If infinite scrolling is enabled, setting to true will clear all non data-preserved elements. Defaults to false.
preserve boolean optional If true, only items that don't have the data-preserve attribute will be removed. Otherwise, all items will be removed. Defaults to false.
.repeater('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.repeater('infiniteScrolling');
Enables or disabled infinite scrolling within the repeater. Used primarily by view extensions. Accepts an optional options object.
$('#myRepeater').repeater('infiniteScrolling');
$('#myRepeater').repeater('infinitescrolling', true, {hybrid: true, percentage: 60});
Argument type description
enable boolean If set to true, this function will enable infinite scrolling. Defaults to false.
options object Optional. Specifies the desired infinite scrolling settings. View the infinite scroll documentation for more details on available features. Your code will ignore the dataSource option on this object in favor of the dataSource on the repeater.
.repeater('render');
Calls the dataSource and renders the repeater data. Accepts an optional options object.
$('#myRepeater').repeater('render');
$('#myRepeater').repeater('render', {'changeView': 'widescreen', 'preserve': true});
Attribute type description
changeView string If set to a string value, this attribute will change the current repeater view to be rendered. Defaults to undefined.
clearInfinite boolean Passed to the clear method - see above for description.
pageIncrement number or null Use a number value to determine the amount by which the current page will increment or decrement. If null the current page will reset to 0.
preserve boolean Passed to the clear method - see above for description.
.repeater('resize');
Resizes the repeater based on staticHeight presence and value

Data Source

Call the dataSource function prior to rendering data for the current view. Receives an options object and callback function as arguments. The options object provides context for which data should return. Please review the dataSourceOptions option if the dataSource needs to be manipulated (such as for a custom render, to search, to sort, or to filter). Use the callback to continue onward with rendering.

The options object can vary in content depending on the view extension used. Many objects share these common attributes in options object format:

Attribute type description
filter object Provides context for the selected .repeater-filters drop-down item representing data filtering. The object contains a text attribute for the displayed text and a value attribute for the value of the selected item.
pageIndex number Represents the current page of data. pageIndex is a zero-based index into an array and may need to be manipulated before requesting more data, if the server request is a one-based index.
pageSize number Provides context for the selected .repeater-itemization dropdown item value, representing the number of data items to be displayed
search string Provides context for the entered .repeater-search search box, representing the desired user search value. Only present if the object includes a search value.
view string Provides context for the selected .repeater-views button group item, representing the current view. Used to determine view-specific return data.

The dataSource's callback function should run after gathering the desired data for rendering. This function requires the code to pass a data object as an argument. Contents of the object will vary depending on the view extension used. The attributes below include common expected attributes:

Attribute type description
count number Provides the number of returned in the data to the repeater. Use this value as the text value for the .repeater-count element.
end number Provides the end index of current displayed data items to the repeater. Use this value as the text value for the .repeater-end element.
page number Sets the current repeater page. Also shown in the .repeater-primaryPaging or .repeater-secondaryPaging element. page is 0-based.
pages number Provides the number of available pages of data to the repeater. Use this value as the text value for the .repeater-pages element. pages is 1-based.
start number Provides the starting index of current displayed data items to the repeater. Use this value as the text value for the .repeater-start element.

The default values are { count: 0, end: 0, items: [], page: 0, pages: 1, start: 0 }.

Events

Event Type Description
disabled.fu.repeater Fires whenever the repeater is disabled.
enabled.fu.repeater Fires whenever the repeater is enabled.
filtered.fu.repeater Fires whenever the repeater is filtered via the dropdown. Passes a filter value argument.
nextClicked.fu.repeater Fires whenever the repeater next page button is clicked.
pageChanged.fu.repeater Fires whenever the repeater page is changed via primary or secondary paging. NOTE: if the paged via primary paging, an array is passed back as a parameter, containing the value and data, respectively. If secondary paging causes the change, only a value is passed as an argument.
pageSizeChanged.fu.repeater Fires whenever the repeater page size is changed. Passes a value argument.
previousClicked.fu.repeater Fires whenever the repeater previous page button is clicked.
rendered.fu.repeater Fires whenever the repeater has rendered data returned from the dataSource. Passses an object containing data, options, and renderOptions.
resized.fu.repeater Fires whenever the repeater is resized.
searchChanged.fu.repeater Fires whenever the repeater search control is used.
viewChanged.fu.repeater Fires whenever the repeater view is switched. Passes the currentView as an argument.

All repeater events are fired on the .repeater classed element.


  $('#myRepeater').on('resized.fu.repeater', function () {
  // do something…
  });
  

Fuel UX Dependencies

Repeater Extensions

The repeater uses a view framework that allows for extensions to represent data in different ways. By default, Fuel UX comes with two repeater view extensions (list and thumbnail). Each extension provides additional options and requires different return data from the dataSource to render appropriately. For information on using extensions, visit the extensions page. You can also learn how to write your own repeater extension.

Examples

Data viewer with paging, sorting, and searching using list and thumbnail extensions. Can be extended further for various other renderings.

Live examples:

Further Reading


  <div class="fu-example section">
    <div class="repeater" id="myRepeater" data-staticheight="400">
      <div class="repeater-header">
        <div class="repeater-header-left">
          <span class="repeater-title">Awesome Repeater</span>
          <div class="repeater-search">
            <div class="search input-group">
              <input class="form-control" type="search" placeholder="Search"/>
              <span class="input-group-btn">
                <button class="btn btn-default" type="button">
                  <span class="glyphicon glyphicon-search"></span>
                  <span class="sr-only">Search</span>
                </button>
              </span>
            </div>
          </div>
        </div>
        <div class="repeater-header-right">
          <div class="btn-group selectlist repeater-filters" data-resize="auto">
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
              <span class="selected-label">&nbsp;</span>
              <span class="caret"></span>
              <span class="sr-only">Toggle Filters</span>
            </button>
            <ul class="dropdown-menu" role="menu">
              <li data-value="all" data-selected="true"><a href="#">all</a></li>
              <li data-value="bug"><a href="#">bug</a></li>
              <li data-value="dark"><a href="#">dark</a></li>
              <li data-value="dragon"><a href="#">dragon</a></li>
              <li data-value="electric"><a href="#">electric</a></li>
              <li data-value="fairy"><a href="#">fairy</a></li>
              <li data-value="fighting"><a href="#">fighting</a></li>
              <li data-value="fire"><a href="#">fire</a></li>
              <li data-value="flying"><a href="#">flying</a></li>
              <li data-value="ghost"><a href="#">ghost</a></li>
              <li data-value="grass"><a href="#">grass</a></li>
              <li data-value="ground"><a href="#">ground</a></li>
              <li data-value="ice"><a href="#">ice</a></li>
              <li data-value="normal"><a href="#">normal</a></li>
              <li data-value="poison"><a href="#">poison</a></li>
              <li data-value="psychic"><a href="#">psychic</a></li>
              <li data-value="rock"><a href="#">rock</a></li>
              <li data-value="steel"><a href="#">steel</a></li>
              <li data-value="water"><a href="#">water</a></li>
            </ul>
            <input class="hidden hidden-field" name="filterSelection" readonly="readonly" aria-hidden="true" type="text"/>
          </div>
          <div class="btn-group repeater-views" data-toggle="buttons">
            <label class="btn btn-default active">
              <input name="repeaterViews" type="radio" value="list"><span class="glyphicon glyphicon-list"></span>
            </label>
            <label class="btn btn-default">
              <input name="repeaterViews" type="radio" value="thumbnail"><span class="glyphicon glyphicon-th"></span>
            </label>
          </div>
        </div>
      </div>
      <div class="repeater-viewport">
        <div class="repeater-canvas"></div>
        <div class="loader repeater-loader"></div>
      </div>
      <div class="repeater-footer">
        <div class="repeater-footer-left">
          <div class="repeater-itemization">
            <span><span class="repeater-start"></span> - <span class="repeater-end"></span> of <span class="repeater-count"></span> items</span>
            <div class="btn-group selectlist" data-resize="auto">
              <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                <span class="selected-label">&nbsp;</span>
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
              </button>
              <ul class="dropdown-menu" role="menu">
                <li data-value="5"><a href="#">5</a></li>
                <li data-value="10" data-selected="true"><a href="#">10</a></li>
                <li data-value="20"><a href="#">20</a></li>
                <li data-value="50" data-foo="bar" data-fizz="buzz"><a href="#">50</a></li>
                <li data-value="100"><a href="#">100</a></li>
              </ul>
              <input class="hidden hidden-field" name="itemsPerPage" readonly="readonly" aria-hidden="true" type="text"/>
            </div>
            <span>Per Page</span>
          </div>
        </div>
        <div class="repeater-footer-right">
          <div class="repeater-pagination">
            <button class="btn btn-default btn-sm repeater-prev" type="button">
              <span class="glyphicon glyphicon-chevron-left"></span>
              <span class="sr-only">Previous Page</span>
            </button>
            <label class="page-label" id="myPageLabel">Page</label>
            <div class="repeater-primaryPaging active">
              <div class="input-group input-append dropdown combobox">
                <input class="form-control" type="text" aria-labelledby="myPageLabel">
                <div class="input-group-btn">
                  <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                    <span class="caret"></span>
                    <span class="sr-only">Toggle Dropdown</span>
                  </button>
                  <ul class="dropdown-menu dropdown-menu-right"></ul>
                </div>
              </div>
            </div>
            <input class="form-control repeater-secondaryPaging" type="text" aria-labelledby="myPageLabel">
            <span>of <span class="repeater-pages"></span></span>
            <button class="btn btn-default btn-sm repeater-next" type="button">
              <span class="glyphicon glyphicon-chevron-right"></span>
              <span class="sr-only">Next Page</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
  

Scheduler scheduler.js

Control which allows users to choose startDateTime, timeZone, and iCal-compatible recurrencePattern. As of 3.11.5, when the user changes the start date, the end date will attempt to intelligently re-set itself if the start date is set to later than the end date.

Usage

Via JavaScript

Instantiate the scheduler control via JavaScript:

$('#myScheduler').scheduler();

The scheduler also accepts optional options params during initialization, one for each start and end date:

$('#myScheduler').scheduler({
    startDateOptions: {
      allowPastDates: true
    },
    endDateOptions: {
      sameYearOnly: true
    }
  });

Via data-attributes

Add data-initialize="scheduler" to the .scheduler element that you wish to initialize on $.ready(). Any scheduler that is programmatically generated after the initial page load will initialize when the mousedown event is fired on it if it has data-initialize="scheduler".

Markup

Place all of the following markup within any "fuelux" classed container (typically the html element). Scheduler consists of a specific arrangement of Datepickers, Comboboxes, Radios, Selectlists, and Spinboxes.


<div class="form-horizontal container-fluid scheduler" id="myScheduler" data-initialize="scheduler" role="form">
    <div class="row start-datetime">
    <label class="col-sm-2 control-label scheduler-label" for="myStartDate">Start Date</label>
    <div class="col-sm-10">
        <div class="row no-margin">
            <div class="col-xs-4 col-sm-4 form-group">
                <div class="datepicker start-date">
                    <div class="input-group">
                        <input class="form-control" id="myStartDate" type="text"/>
                        <div class="input-group-btn">
                            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                                <span class="glyphicon glyphicon-calendar"></span>
                                <span class="sr-only">Toggle Calendar</span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
                                <div class="datepicker-calendar">
                                    <div class="datepicker-calendar-header">
                                        <button class="prev" type="button"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
                                        <button class="next" type="button"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
                                        <button class="title" type="button">
                                                <span class="month">
                                                    <span data-month="0">January</span>
                                                    <span data-month="1">February</span>
                                                    <span data-month="2">March</span>
                                                    <span data-month="3">April</span>
                                                    <span data-month="4">May</span>
                                                    <span data-month="5">June</span>
                                                    <span data-month="6">July</span>
                                                    <span data-month="7">August</span>
                                                    <span data-month="8">September</span>
                                                    <span data-month="9">October</span>
                                                    <span data-month="10">November</span>
                                                    <span data-month="11">December</span>
                                                </span> <span class="year"></span>
                                        </button>
                                    </div>
                                    <table class="datepicker-calendar-days">
                                        <thead>
                                        <tr>
                                            <th>Su</th>
                                            <th>Mo</th>
                                            <th>Tu</th>
                                            <th>We</th>
                                            <th>Th</th>
                                            <th>Fr</th>
                                            <th>Sa</th>
                                        </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                    <div class="datepicker-calendar-footer">
                                        <button class="datepicker-today" type="button">Today</button>
                                    </div>
                                </div>
                                <div class="datepicker-wheels" aria-hidden="true">
                                    <div class="datepicker-wheels-month">
                                        <h2 class="header">Month</h2>
                                        <ul>
                                            <li data-month="0"><button type="button">Jan</button></li>
                                            <li data-month="1"><button type="button">Feb</button></li>
                                            <li data-month="2"><button type="button">Mar</button></li>
                                            <li data-month="3"><button type="button">Apr</button></li>
                                            <li data-month="4"><button type="button">May</button></li>
                                            <li data-month="5"><button type="button">Jun</button></li>
                                            <li data-month="6"><button type="button">Jul</button></li>
                                            <li data-month="7"><button type="button">Aug</button></li>
                                            <li data-month="8"><button type="button">Sep</button></li>
                                            <li data-month="9"><button type="button">Oct</button></li>
                                            <li data-month="10"><button type="button">Nov</button></li>
                                            <li data-month="11"><button type="button">Dec</button></li>
                                        </ul>
                                    </div>
                                    <div class="datepicker-wheels-year">
                                        <h2 class="header">Year</h2>
                                        <ul></ul>
                                    </div>
                                    <div class="datepicker-wheels-footer clearfix">
                                        <button class="btn datepicker-wheels-back" type="button"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
                                        <button class="btn datepicker-wheels-select" type="button">Select <span class="sr-only">Month and Year</span></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4 col-sm-4 form-group">
                <label class="sr-only" for="MyStartTime">Start Time</label>
                <div class="input-group combobox start-time">
                    <input class="form-control" id="MyStartTime" type="text" />
                    <div class="input-group-btn">
                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            <li data-value="12:00 AM"><a href="#">12:00 AM</a></li>
                            <li data-value="12:30 AM"><a href="#">12:30 AM</a></li>
                            <li data-value="1:00 AM"><a href="#">1:00 AM</a></li>
                            <li data-value="1:30 AM"><a href="#">1:30 AM</a></li>
                            <li data-value="2:00 AM"><a href="#">2:00 AM</a></li>
                            <li data-value="2:30 AM"><a href="#">2:30 AM</a></li>
                            <li data-value="3:00 AM"><a href="#">3:00 AM</a></li>
                            <li data-value="3:30 AM"><a href="#">3:30 AM</a></li>
                            <li data-value="4:00 AM"><a href="#">4:00 AM</a></li>
                            <li data-value="4:30 AM"><a href="#">4:30 AM</a></li>
                            <li data-value="5:00 AM"><a href="#">5:00 AM</a></li>
                            <li data-value="5:30 AM"><a href="#">5:30 AM</a></li>
                            <li data-value="6:00 AM"><a href="#">6:00 AM</a></li>
                            <li data-value="6:30 AM"><a href="#">6:30 AM</a></li>
                            <li data-value="7:00 AM"><a href="#">7:00 AM</a></li>
                            <li data-value="7:30 AM"><a href="#">7:30 AM</a></li>
                            <li data-value="8:00 AM"><a href="#">8:00 AM</a></li>
                            <li data-value="8:30 AM"><a href="#">8:30 AM</a></li>
                            <li data-value="9:00 AM"><a href="#">9:00 AM</a></li>
                            <li data-value="9:30 AM"><a href="#">9:30 AM</a></li>
                            <li data-value="10:00 AM"><a href="#">10:00 AM</a></li>
                            <li data-value="10:30 AM"><a href="#">10:30 AM</a></li>
                            <li data-value="11:00 AM"><a href="#">11:00 AM</a></li>
                            <li data-value="11:30 AM"><a href="#">11:30 AM</a></li>
                            <li data-value="12:00 PM"><a href="#">12:00 PM</a></li>
                            <li data-value="12:30 PM"><a href="#">12:30 PM</a></li>
                            <li data-value="1:00 PM"><a href="#">1:00 PM</a></li>
                            <li data-value="1:30 PM"><a href="#">1:30 PM</a></li>
                            <li data-value="2:00 PM"><a href="#">2:00 PM</a></li>
                            <li data-value="2:30 PM"><a href="#">2:30 PM</a></li>
                            <li data-value="3:00 PM"><a href="#">3:00 PM</a></li>
                            <li data-value="3:30 PM"><a href="#">3:30 PM</a></li>
                            <li data-value="4:00 PM"><a href="#">4:00 PM</a></li>
                            <li data-value="4:30 PM"><a href="#">4:30 PM</a></li>
                            <li data-value="5:00 PM"><a href="#">5:00 PM</a></li>
                            <li data-value="5:30 PM"><a href="#">5:30 PM</a></li>
                            <li data-value="6:00 PM"><a href="#">6:00 PM</a></li>
                            <li data-value="6:30 PM"><a href="#">6:30 PM</a></li>
                            <li data-value="7:00 PM"><a href="#">7:00 PM</a></li>
                            <li data-value="7:30 PM"><a href="#">7:30 PM</a></li>
                            <li data-value="8:00 PM"><a href="#">8:00 PM</a></li>
                            <li data-value="8:30 PM"><a href="#">8:30 PM</a></li>
                            <li data-value="9:00 PM"><a href="#">9:00 PM</a></li>
                            <li data-value="9:30 PM"><a href="#">9:30 PM</a></li>
                            <li data-value="10:00 PM"><a href="#">10:00 PM</a></li>
                            <li data-value="10:30 PM"><a href="#">10:30 PM</a></li>
                            <li data-value="11:00 PM"><a href="#">11:00 PM</a></li>
                            <li data-value="11:30 PM"><a href="#">11:30 PM</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row timezone-container">
    <label class="col-sm-2 control-label scheduler-label">Timezone</label>
    <div class="col-xs-10 col-sm-10 col-md-10">
        <div class="btn-group selectlist timezone" data-resize="auto">
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                <span class="selected-label">(GMT-06:00) Central Standard Time</span>
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li data-name="Central Standard Time (no DST)" data-offset="-06:00"><a href="#">(GMT-06:00) Central Standard Time</a></li>
                <li data-name="Morocco Standard Time" data-offset="+00:00"><a href="#">(GMT) Casablanca *</a></li>
                <li data-name="GMT Standard Time" data-offset="+00:00"><a href="#">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London *</a></li>
                <li data-name="Greenwich Standard Time" data-offset="+00:00"><a href="#">(GMT) Monrovia, Reykjavik</a></li>
                <li data-name="W. Europe Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna *</a></li>
                <li data-name="Central Europe Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague *</a></li>
                <li data-name="Romance Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris *</a></li>
                <li data-name="Central European Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb *</a></li>
                <li data-name="W. Central Africa Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) West Central Africa</a></li>
                <li data-name="Jordan Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Amman *</a></li>
                <li data-name="GTB Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Athens, Bucharest, Istanbul *</a></li>
                <li data-name="Middle East Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Beirut *</a></li>
                <li data-name="Egypt Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Cairo *</a></li>
                <li data-name="South Africa Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Harare, Pretoria</a></li>
                <li data-name="FLE Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius *</a></li>
                <li data-name="Israel Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Jerusalem *</a></li>
                <li data-name="E. Europe Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Minsk *</a></li>
                <li data-name="Namibia Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Windhoek *</a></li>
                <li data-name="Arabic Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Baghdad *</a></li>
                <li data-name="Arab Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Kuwait, Riyadh</a></li>
                <li data-name="Russian Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Moscow, St. Petersburg, Volgograd *</a></li>
                <li data-name="E. Africa Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Nairobi</a></li>
                <li data-name="Georgian Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Tbilisi</a></li>
                <li data-name="Iran Standard Time" data-offset="+03:30"><a href="#">(GMT+03:30) Tehran *</a></li>
                <li data-name="Arabian Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Abu Dhabi, Muscat</a></li>
                <li data-name="Azerbaijan Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Baku *</a></li>
                <li data-name="Caucasus Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Caucasus Standard Time</a></li>
                <li data-name="Mauritius Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Port Louis *</a></li>
                <li data-name="Caucasus Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Yerevan</a></li>
                <li data-name="Afghanistan Standard Time" data-offset="+04:30"><a href="#">(GMT+04:30) Kabul</a></li>
                <li data-name="Ekaterinburg Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Ekaterinburg *</a></li>
                <li data-name="Pakistan Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Islamabad, Karachi *</a></li>
                <li data-name="West Asia Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Tashkent</a></li>
                <li data-name="India Standard Time" data-offset="+05:30"><a href="#">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</a></li>
                <li data-name="Sri Lanka Standard Time" data-offset="+05:30"><a href="#">(GMT+05:30) Sri Jayawardenepura</a></li>
                <li data-name="Nepal Standard Time" data-offset="+05:45"><a href="#">(GMT+05:45) Kathmandu</a></li>
                <li data-name="N. Central Asia Standard Time" data-offset="+06:00"><a href="#">(GMT+06:00) Almaty, Novosibirsk *</a></li>
                <li data-name="Central Asia Standard Time" data-offset="+06:00"><a href="#">(GMT+06:00) Astana, Dhaka</a></li>
                <li data-name="Myanmar Standard Time" data-offset="+06:00"><a href="#">(GMT+06:30) Yangon (Rangoon)</a></li>
                <li data-name="SE Asia Standard Time" data-offset="+07:00"><a href="#">(GMT+07:00) Bangkok, Hanoi, Jakarta</a></li>
                <li data-name="North Asia Standard Time" data-offset="+07:00"><a href="#">(GMT+07:00) Krasnoyarsk *</a></li>
                <li data-name="China Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</a></li>
                <li data-name="North Asia East Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Irkutsk, Ulaan Bataar *</a></li>
                <li data-name="Singapore Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Kuala Lumpur, Singapore</a></li>
                <li data-name="W. Australia Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Perth *</a></li>
                <li data-name="Taipei Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Taipei</a></li>
                <li data-name="Tokyo Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Osaka, Sapporo, Tokyo</a></li>
                <li data-name="Korea Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Seoul</a></li>
                <li data-name="Yakutsk Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Yakutsk *</a></li>
                <li data-name="Cen. Australia Standard Time" data-offset="+09:30"><a href="#">(GMT+09:30) Adelaide *</a></li>
                <li data-name="AUS Central Standard Time" data-offset="+09:30"><a href="#">(GMT+09:30) Darwin</a></li>
                <li data-name="E. Australia Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Brisbane</a></li>
                <li data-name="AUS Eastern Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Canberra, Melbourne, Sydney *</a></li>
                <li data-name="West Pacific Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Guam, Port Moresby</a></li>
                <li data-name="Tasmania Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Hobart *</a></li>
                <li data-name="Vladivostok Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Vladivostok *</a></li>
                <li data-name="Central Pacific Standard Time" data-offset="+11:00"><a href="#">(GMT+11:00) Magadan, Solomon Is., New Caledonia</a></li>
                <li data-name="New Zealand Standard Time" data-offset="+12:00"><a href="#">(GMT+12:00) Auckland, Wellington *</a></li>
                <li data-name="Fiji Standard Time" data-offset="+12:00"><a href="#">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</a></li>
                <li data-name="Tonga Standard Time" data-offset="+12:00"><a href="#">(GMT+13:00) Nukualofa</a></li>
                <li data-name="Azores Standard Time" data-offset="+12:00"><a href="#">(GMT-01:00) Azores *</a></li>
                <li data-name="Cape Verde Standard Time" data-offset="-01:00"><a href="#">(GMT-01:00) Cape Verde Is.</a></li>
                <li data-name="Mid-Atlantic Standard Time" data-offset="-02:00"><a href="#">(GMT-02:00) Mid-Atlantic *</a></li>
                <li data-name="E. South America Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Brasilia *</a></li>
                <li data-name="Argentina Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Buenos Aires *</a></li>
                <li data-name="SA Western Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Georgetown</a></li>
                <li data-name="Greenland Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Greenland *</a></li>
                <li data-name="Montevideo Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Montevideo *</a></li>
                <li data-name="Newfoundland Standard Time" data-offset="-03:00"><a href="#">(GMT-03:30) Newfoundland *</a></li>
                <li data-name="Atlantic Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Atlantic Time (Canada) *</a></li>
                <li data-name="SA Western Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) La Paz</a></li>
                <li data-name="Central Brazilian Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Manaus *</a></li>
                <li data-name="Pacific SA Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Santiago *</a></li>
                <li data-name="Venezuela Standard Time" data-offset="-04:30"><a href="#">(GMT-04:30) Caracas</a></li>
                <li data-name="SA Pacific Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</a></li>
                <li data-name="Eastern Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Eastern Time (US &amp; Canada) *</a></li>
                <li data-name="US Eastern Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Indiana (East)</a></li>
                <li data-name="Central America Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Central America</a></li>
                <li data-name="Central Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Central Time (US &amp; Canada) *</a></li>
                <li data-name="Central Standard Time (Mexico)" data-offset="-06:00"><a href="#">(GMT-06:00) Guadalajara, Mexico City, Monterrey - New *</a></li>
                <li data-name="Central Standard Time (Mexico)" data-offset="-06:00"><a href="#">(GMT-06:00) Guadalajara, Mexico City, Monterrey - Old</a></li>
                <li data-name="Canada Central Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Saskatchewan</a></li>
                <li data-name="US Mountain Standard Time" data-offset="-07:00"><a href="#">(GMT-07:00) Arizona</a></li>
                <li data-name="Mountain Standard Time (Mexico)" data-offset="-07:00"><a href="#">(GMT-07:00) Chihuahua, La Paz, Mazatlan - New *</a></li>
                <li data-name="Mountain Standard Time (Mexico)" data-offset="-07:00"><a href="#">(GMT-07:00) Chihuahua, La Paz, Mazatlan - Old</a></li>
                <li data-name="Mountain Standard Time" data-offset="-07:00"><a href="#">(GMT-07:00) Mountain Time (US &amp; Canada) *</a></li>
                <li data-name="Pacific Standard Time" data-offset="-08:00"><a href="#">(GMT-08:00) Pacific Time (US &amp; Canada) *</a></li>
                <li data-name="Pacific Standard Time (Mexico)" data-offset="-08:00"><a href="#">(GMT-08:00) Tijuana, Baja California *</a></li>
                <li data-name="Alaskan Standard Time" data-offset="-09:00"><a href="#">(GMT-09:00) Alaska *</a></li>
                <li data-name="Hawaiian Standard Time" data-offset="-10:00"><a href="#">(GMT-10:00) Hawaii</a></li>
                <li data-name="Samoa Standard Time" data-offset="-11:00"><a href="#">(GMT-11:00) Midway Island, Samoa</a></li>
                <li data-name="Dateline Standard Time" data-offset="-12:00"><a href="#">(GMT-12:00) International Date Line West</a></li>
            </ul>
            <input type="text" aria-hidden="true" class="hidden hidden-field" name="TimeZoneSelectlist" readonly="readonly">
        </div>
    </div>
</div>

<div class="row repeat-container">
    <label class="col-sm-2 control-label scheduler-label">Repeat</label>
    <div class="col-sm-10">

        <div class="form-group repeat-interval">
            <div class="btn-group selectlist pull-left repeat-options" data-resize="auto">
                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                    <span class="selected-label">None (run once)</span>
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    <li data-value="none"><a href="#">None (run once)</a></li>
                    <li data-value="secondly" data-text="second(s)"><a href="#">Per Second</a>
                    <li data-value="minutely" data-text="minute(s)"><a href="#">Per Minute</a>
                    <li data-value="hourly" data-text="hour(s)"><a href="#">Hourly</a></li>
                    <li data-value="daily" data-text="day(s)"><a href="#">Daily</a></li>
                    <li data-value="weekdays"><a href="#">Weekdays</a></li>
                    <li data-value="weekly" data-text="week(s)"><a href="#">Weekly</a></li>
                    <li data-value="monthly" data-text="month(s)"><a href="#">Monthly</a></li>
                    <li data-value="yearly"><a href="#">Yearly</a></li>
                </ul>
                <input type="text" aria-hidden="true" class="hidden hidden-field" name="intervalSelectlist" readonly="readonly">
            </div>

            <div class="repeat-panel repeat-every-panel repeat-hourly repeat-daily repeat-weekly hide" aria-hidden="true">
                <label class="inline-form-text repeat-every-pretext" id="MySchedulerEveryLabel">every</label>

                <div class="spinbox digits-3 repeat-every">
                    <input class="form-control input-mini spinbox-input" type="text" aria-labelledby="MySchedulerEveryLabel">
                    <div class="spinbox-buttons btn-group btn-group-vertical">
                        <button class="btn btn-default spinbox-up btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-up"></span><span class="sr-only">Increase</span>
                        </button>
                        <button class="btn btn-default spinbox-down btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-down"></span><span class="sr-only">Decrease</span>
                        </button>
                    </div>
                </div>

                <div class="inline-form-text repeat-every-text"></div>
            </div>
        </div>

        <div class="form-group repeat-panel repeat-weekly repeat-days-of-the-week hide" aria-hidden="true">
            <fieldset class="btn-group" data-toggle="buttons">
                <label class="btn btn-default"><input data-value="SU" type="checkbox">Sun</label>
                <label class="btn btn-default"><input data-value="MO" type="checkbox">Mon</label>
                <label class="btn btn-default"><input data-value="TU" type="checkbox">Tue</label>
                <label class="btn btn-default"><input data-value="WE" type="checkbox"> Wed</label>
                <label class="btn btn-default"><input data-value="TH" type="checkbox"> Thu</label>
                <label class="btn btn-default"><input data-value="FR" type="checkbox"> Fri</label>
                <label class="btn btn-default"><input data-value="SA" type="checkbox"> Sat</label>
            </fieldset>
        </div>

        <div class="repeat-panel repeat-monthly hide" aria-hidden="true">
            <div class="form-group repeat-monthly-date">
                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-monthly" type="radio" checked="checked" value="bymonthday">
                        <span class="radio-label">on day</span>
                    </label>
                </div>

                <div class="btn-group selectlist pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">1</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">1</a></li>
                        <li data-value="2"><a href="#">2</a></li>
                        <li data-value="3"><a href="#">3</a></li>
                        <li data-value="4"><a href="#">4</a></li>
                        <li data-value="5"><a href="#">5</a></li>
                        <li data-value="6"><a href="#">6</a></li>
                        <li data-value="7"><a href="#">7</a></li>
                        <li data-value="8"><a href="#">8</a></li>
                        <li data-value="9"><a href="#">9</a></li>
                        <li data-value="10"><a href="#">10</a></li>
                        <li data-value="11"><a href="#">11</a></li>
                        <li data-value="12"><a href="#">12</a></li>
                        <li data-value="13"><a href="#">13</a></li>
                        <li data-value="14"><a href="#">14</a></li>
                        <li data-value="15"><a href="#">15</a></li>
                        <li data-value="16"><a href="#">16</a></li>
                        <li data-value="17"><a href="#">17</a></li>
                        <li data-value="18"><a href="#">18</a></li>
                        <li data-value="19"><a href="#">19</a></li>
                        <li data-value="20"><a href="#">20</a></li>
                        <li data-value="21"><a href="#">21</a></li>
                        <li data-value="22"><a href="#">22</a></li>
                        <li data-value="23"><a href="#">23</a></li>
                        <li data-value="24"><a href="#">24</a></li>
                        <li data-value="25"><a href="#">25</a></li>
                        <li data-value="26"><a href="#">26</a></li>
                        <li data-value="27"><a href="#">27</a></li>
                        <li data-value="28"><a href="#">28</a></li>
                        <li data-value="29"><a href="#">29</a></li>
                        <li data-value="30"><a href="#">30</a></li>
                        <li data-value="31"><a href="#">31</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>
            </div>

            <div class="repeat-monthly-day form-group">
                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-monthly" type="radio" checked="checked" value="bysetpos">
                        <span class="radio-label">on the</span>
                    </label>
                </div>

                <div class="btn-group selectlist month-day-pos pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">First</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">First</a></li>
                        <li data-value="2"><a href="#">Second</a></li>
                        <li data-value="3"><a href="#">Third</a></li>
                        <li data-value="4"><a href="#">Fourth</a></li>
                        <li data-value="-1"><a href="#">Last</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist month-days pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Sunday</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="SU"><a href="#">Sunday</a></li>
                        <li data-value="MO"><a href="#">Monday</a></li>
                        <li data-value="TU"><a href="#">Tuesday</a></li>
                        <li data-value="WE"><a href="#">Wednesday</a></li>
                        <li data-value="TH"><a href="#">Thursday</a></li>
                        <li data-value="FR"><a href="#">Friday</a></li>
                        <li data-value="SA"><a href="#">Saturday</a></li>
                        <li data-value="SU,MO,TU,WE,TH,FR,SA"><a href="#">Day</a></li>
                        <li data-value="MO,TU,WE,TH,FR"><a href="#">Weekday</a></li>
                        <li data-value="SU,SA"><a href="#">Weekend day</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

            </div>
        </div>

        <div class="repeat-panel repeat-yearly hide" aria-hidden="true">
            <div class="form-group repeat-yearly-date">

                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-yearly" type="radio" checked="checked" value="bymonthday">
                        <span class="radio-label">on</span>
                    </label>
                </div>

                <div class="btn-group selectlist year-month pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">January</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">January</a></li>
                        <li data-value="2"><a href="#">February</a></li>
                        <li data-value="3"><a href="#">March</a></li>
                        <li data-value="4"><a href="#">April</a></li>
                        <li data-value="5"><a href="#">May</a></li>
                        <li data-value="6"><a href="#">June</a></li>
                        <li data-value="7"><a href="#">July</a></li>
                        <li data-value="8"><a href="#">August</a></li>
                        <li data-value="9"><a href="#">September</a></li>
                        <li data-value="10"><a href="#">October</a></li>
                        <li data-value="11"><a href="#">November</a></li>
                        <li data-value="12"><a href="#">December</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist year-month-day pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">1</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">1</a></li>
                        <li data-value="2"><a href="#">2</a></li>
                        <li data-value="3"><a href="#">3</a></li>
                        <li data-value="4"><a href="#">4</a></li>
                        <li data-value="5"><a href="#">5</a></li>
                        <li data-value="6"><a href="#">6</a></li>
                        <li data-value="7"><a href="#">7</a></li>
                        <li data-value="8"><a href="#">8</a></li>
                        <li data-value="9"><a href="#">9</a></li>
                        <li data-value="10"><a href="#">10</a></li>
                        <li data-value="11"><a href="#">11</a></li>
                        <li data-value="12"><a href="#">12</a></li>
                        <li data-value="13"><a href="#">13</a></li>
                        <li data-value="14"><a href="#">14</a></li>
                        <li data-value="15"><a href="#">15</a></li>
                        <li data-value="16"><a href="#">16</a></li>
                        <li data-value="17"><a href="#">17</a></li>
                        <li data-value="18"><a href="#">18</a></li>
                        <li data-value="19"><a href="#">19</a></li>
                        <li data-value="20"><a href="#">20</a></li>
                        <li data-value="21"><a href="#">21</a></li>
                        <li data-value="22"><a href="#">22</a></li>
                        <li data-value="23"><a href="#">23</a></li>
                        <li data-value="24"><a href="#">24</a></li>
                        <li data-value="25"><a href="#">25</a></li>
                        <li data-value="26"><a href="#">26</a></li>
                        <li data-value="27"><a href="#">27</a></li>
                        <li data-value="28"><a href="#">28</a></li>
                        <li data-value="29"><a href="#">29</a></li>
                        <li data-value="30"><a href="#">30</a></li>
                        <li data-value="31"><a href="#">31</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>
            </div>

            <div class="form-group repeat-yearly-day">

                <div class="radio pull-left"><label class="radio-custom"><input class="sr-only" name="repeat-yearly" type="radio" value="bysetpos"> on the</label></div>

                <div class="btn-group selectlist year-month-day-pos pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">First</span>
                        <span class="caret"></span>
                        <span class="sr-only">First</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">First</a></li>
                        <li data-value="2"><a href="#">Second</a></li>
                        <li data-value="3"><a href="#">Third</a></li>
                        <li data-value="4"><a href="#">Fourth</a></li>
                        <li data-value="-1"><a href="#">Last</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDateSelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist year-month-days pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Sunday</span>
                        <span class="caret"></span>
                        <span class="sr-only">Sunday</span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="SU"><a href="#">Sunday</a></li>
                        <li data-value="MO"><a href="#">Monday</a></li>
                        <li data-value="TU"><a href="#">Tuesday</a></li>
                        <li data-value="WE"><a href="#">Wednesday</a></li>
                        <li data-value="TH"><a href="#">Thursday</a></li>
                        <li data-value="FR"><a href="#">Friday</a></li>
                        <li data-value="SA"><a href="#">Saturday</a></li>
                        <li data-value="SU,MO,TU,WE,TH,FR,SA"><a href="#">Day</a></li>
                        <li data-value="MO,TU,WE,TH,FR"><a href="#">Weekday</a></li>
                        <li data-value="SU,SA"><a href="#">Weekend day</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDaySelectlist" readonly="readonly">
                </div>
                <div class="inline-form-text repeat-yearly-day-text"> of </div>

                <div class="btn-group selectlist year-month pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">January</span>
                        <span class="caret"></span>
                        <span class="sr-only">January</span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">January</a></li>
                        <li data-value="2"><a href="#">February</a></li>
                        <li data-value="3"><a href="#">March</a></li>
                        <li data-value="4"><a href="#">April</a></li>
                        <li data-value="5"><a href="#">May</a></li>
                        <li data-value="6"><a href="#">June</a></li>
                        <li data-value="7"><a href="#">July</a></li>
                        <li data-value="8"><a href="#">August</a></li>
                        <li data-value="9"><a href="#">September</a></li>
                        <li data-value="10"><a href="#">October</a></li>
                        <li data-value="11"><a href="#">November</a></li>
                        <li data-value="12"><a href="#">December</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDaySelectlist" readonly="readonly">
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row repeat-end hide" aria-hidden="true">
    <label class="col-sm-2 control-label scheduler-label">End</label>
    <div class="col-sm-10">
        <div class="row">
            <div class="col-xs-3 col-sm-3 col-lg-2 form-group">
                <div class="btn-group selectlist end-options pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Never</span>
                        <span class="caret"></span>
                        <span class="sr-only">Never</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="never"><a href="#">Never</a></li>
                        <li data-value="after"><a href="#">After</a></li>
                        <li data-value="date"><a href="#">On date</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="EndSelectlist" readonly="readonly">
                </div>
            </div>

            <div class="col-sm-4 col-lg-4 form-group end-option-panel end-after-panel pull-left hide" aria-hidden="true">
                <div class="spinbox digits-3 end-after">
                    <label class="sr-only" id="MyEndAfter">End After</label>
                    <input class="form-control input-mini spinbox-input" type="text" aria-labelledby="MyEndAfter">
                    <div class="spinbox-buttons btn-group btn-group-vertical">
                        <button class="btn btn-default spinbox-up btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-up"></span><span class="sr-only">Increase</span>
                        </button>
                        <button class="btn btn-default spinbox-down btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-down"></span><span class="sr-only">Decrease</span>
                        </button>
                    </div>
                </div>
                <div class="inline-form-text end-after-text">occurrence(s)</div>
            </div>

            <div class="col-xs-4 col-sm-4 col-lg-4 form-group end-option-panel end-on-date-panel pull-left hide" aria-hidden="true">
                <div class="datepicker end-on-date">
                    <div class="input-group">
                        <input class="form-control" id="myEndDate" type="text"/>
                        <div class="input-group-btn">
                            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                                <span class="glyphicon glyphicon-calendar"></span>
                                <span class="sr-only">Toggle Calendar</span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
                                <div class="datepicker-calendar">
                                    <div class="datepicker-calendar-header">
                                        <button class="prev" type="button"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
                                        <button class="next" type="button"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
                                        <button class="title" type="button">
                                            <span class="month">
                                                <span data-month="0">January</span>
                                                <span data-month="1">February</span>
                                                <span data-month="2">March</span>
                                                <span data-month="3">April</span>
                                                <span data-month="4">May</span>
                                                <span data-month="5">June</span>
                                                <span data-month="6">July</span>
                                                <span data-month="7">August</span>
                                                <span data-month="8">September</span>
                                                <span data-month="9">October</span>
                                                <span data-month="10">November</span>
                                                <span data-month="11">December</span>
                                            </span> <span class="year"></span>
                                        </button>
                                    </div>
                                    <table class="datepicker-calendar-days">
                                        <thead>
                                        <tr>
                                            <th>Su</th>
                                            <th>Mo</th>
                                            <th>Tu</th>
                                            <th>We</th>
                                            <th>Th</th>
                                            <th>Fr</th>
                                            <th>Sa</th>
                                        </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                    <div class="datepicker-calendar-footer">
                                        <button class="datepicker-today" type="button">Today</button>
                                    </div>
                                </div>
                                <div class="datepicker-wheels" aria-hidden="true">
                                    <div class="datepicker-wheels-month">
                                        <h2 class="header">Month</h2>
                                        <ul>
                                            <li data-month="0"><button type="button">Jan</button></li>
                                            <li data-month="1"><button type="button">Feb</button></li>
                                            <li data-month="2"><button type="button">Mar</button></li>
                                            <li data-month="3"><button type="button">Apr</button></li>
                                            <li data-month="4"><button type="button">May</button></li>
                                            <li data-month="5"><button type="button">Jun</button></li>
                                            <li data-month="6"><button type="button">Jul</button></li>
                                            <li data-month="7"><button type="button">Aug</button></li>
                                            <li data-month="8"><button type="button">Sep</button></li>
                                            <li data-month="9"><button type="button">Oct</button></li>
                                            <li data-month="10"><button type="button">Nov</button></li>
                                            <li data-month="11"><button type="button">Dec</button></li>
                                        </ul>
                                    </div>
                                    <div class="datepicker-wheels-year">
                                        <h2 class="header">Year</h2>
                                        <ul></ul>
                                    </div>
                                    <div class="datepicker-wheels-footer clearfix">
                                        <button class="btn datepicker-wheels-back" type="button"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
                                        <button class="btn datepicker-wheels-select" type="button">Select <span class="sr-only">Month and Year</span></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</div>
    

Options

Should be passed in as an object (eg. {name: value}) on initialization. If initializing with options, Javascript initialization is required (you can't initialize with options through data-attributes).

Name type default description
startDateOptions object {} Attributes used to configure the datepicker object. All options for datepicker are available and they can be found in the datepicker documentation.
endDateOptions object {} This option can be set but will only be used if the event is repeated. Attributes used to configure the datepicker object. All options for datepicker are available and they can be found in the datepicker documentation.
startDateChanged function undefined As of 3.11.5, Function to be run when the start date is changed. Currently this._guessEndDate(); is called, but, if you pass a function, your function will be called instead. Your function can call this._guessEndDate(); at any point from within the function to take advantage of the pre-built Guess End Date AI. See the code for details. Example here.

Methods

Once your scheduler is initialized, you can execute any of the following methods on it:

.scheduler('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.scheduler('disable')
Ensure all scheduler form fields are disabled
.scheduler('enable')
Ensure all scheduler form fields are enabled
.scheduler('value')
Gets or sets the current scheduler form field information
$('#myScheduler').scheduler('value');
$('#myScheduler').scheduler('value', {
  startDateTime: '2014-03-31T03:23+02:00',
  timeZone: {
    offset: '+02:00'
  },
  recurrencePattern: 'FREQ=MONTHLY;INTERVAL=6;BYDAY=WE;BYSETPOS=3;UNTIL=20140919;'
});
Parameter Description
startDateTime Required. String representing the start date & time in ISO 8601 format.
timeZone Optional. String or Object (as {name: 'value'} or {offset: '+00:00'}) used for method call to selectBySelector() on scheduler's Timezone selectList. Whatever is passed in will be passed along to selectlist.selectBySelector(value). If a String is passed, it will be passed along as-is. If an Object is passed, name will be passed along if present, otherwise offset will be passed along but never both.
recurrencePattern Optional. String representing the iCal recurrence value.

Events

Event Type Description
changed.fu.scheduler This event fires when the user changes any setting.

All scheduler event listeners should be attached to the element containing the scheduler class. Given the above example markup, you would attach event listeners thusly:

$('#myScheduler').on('changed.fu.scheduler', function () {
  // do something
});

Fuel UX Dependencies

Examples

Static example

The following static scheduler displays all components simultaneously (start date and time, timezone, and all recurrence and recurrence end options) for illustration purposes only.

Live demo


Sample Methods

<div class="form-horizontal container-fluid scheduler" id="myScheduler" data-initialize="scheduler" role="form">
<div class="row start-datetime">
    <label class="col-sm-2 control-label scheduler-label" for="myStartDate">Start Date</label>
    <div class="col-sm-10">
        <div class="row no-margin">
            <div class="col-xs-4 col-sm-4 form-group">
                <div class="datepicker start-date">
                    <div class="input-group">
                        <input class="form-control" id="myStartDate" type="text"/>
                        <div class="input-group-btn">
                            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                                <span class="glyphicon glyphicon-calendar"></span>
                                <span class="sr-only">Toggle Calendar</span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
                                <div class="datepicker-calendar">
                                    <div class="datepicker-calendar-header">
                                        <button class="prev" type="button"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
                                        <button class="next" type="button"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
                                        <button class="title" type="button">
                                                <span class="month">
                                                    <span data-month="0">January</span>
                                                    <span data-month="1">February</span>
                                                    <span data-month="2">March</span>
                                                    <span data-month="3">April</span>
                                                    <span data-month="4">May</span>
                                                    <span data-month="5">June</span>
                                                    <span data-month="6">July</span>
                                                    <span data-month="7">August</span>
                                                    <span data-month="8">September</span>
                                                    <span data-month="9">October</span>
                                                    <span data-month="10">November</span>
                                                    <span data-month="11">December</span>
                                                </span> <span class="year"></span>
                                        </button>
                                    </div>
                                    <table class="datepicker-calendar-days">
                                        <thead>
                                        <tr>
                                            <th>Su</th>
                                            <th>Mo</th>
                                            <th>Tu</th>
                                            <th>We</th>
                                            <th>Th</th>
                                            <th>Fr</th>
                                            <th>Sa</th>
                                        </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                    <div class="datepicker-calendar-footer">
                                        <button class="datepicker-today" type="button">Today</button>
                                    </div>
                                </div>
                                <div class="datepicker-wheels" aria-hidden="true">
                                    <div class="datepicker-wheels-month">
                                        <h2 class="header">Month</h2>
                                        <ul>
                                            <li data-month="0"><button type="button">Jan</button></li>
                                            <li data-month="1"><button type="button">Feb</button></li>
                                            <li data-month="2"><button type="button">Mar</button></li>
                                            <li data-month="3"><button type="button">Apr</button></li>
                                            <li data-month="4"><button type="button">May</button></li>
                                            <li data-month="5"><button type="button">Jun</button></li>
                                            <li data-month="6"><button type="button">Jul</button></li>
                                            <li data-month="7"><button type="button">Aug</button></li>
                                            <li data-month="8"><button type="button">Sep</button></li>
                                            <li data-month="9"><button type="button">Oct</button></li>
                                            <li data-month="10"><button type="button">Nov</button></li>
                                            <li data-month="11"><button type="button">Dec</button></li>
                                        </ul>
                                    </div>
                                    <div class="datepicker-wheels-year">
                                        <h2 class="header">Year</h2>
                                        <ul></ul>
                                    </div>
                                    <div class="datepicker-wheels-footer clearfix">
                                        <button class="btn datepicker-wheels-back" type="button"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
                                        <button class="btn datepicker-wheels-select" type="button">Select <span class="sr-only">Month and Year</span></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-4 col-sm-4 form-group">
                <label class="sr-only" for="MyStartTime">Start Time</label>
                <div class="input-group combobox start-time">
                    <input class="form-control" id="MyStartTime" type="text" />
                    <div class="input-group-btn">
                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                            <span class="caret"></span>
                            <span class="sr-only">Toggle Dropdown</span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                            <li data-value="12:00 AM"><a href="#">12:00 AM</a></li>
                            <li data-value="12:30 AM"><a href="#">12:30 AM</a></li>
                            <li data-value="1:00 AM"><a href="#">1:00 AM</a></li>
                            <li data-value="1:30 AM"><a href="#">1:30 AM</a></li>
                            <li data-value="2:00 AM"><a href="#">2:00 AM</a></li>
                            <li data-value="2:30 AM"><a href="#">2:30 AM</a></li>
                            <li data-value="3:00 AM"><a href="#">3:00 AM</a></li>
                            <li data-value="3:30 AM"><a href="#">3:30 AM</a></li>
                            <li data-value="4:00 AM"><a href="#">4:00 AM</a></li>
                            <li data-value="4:30 AM"><a href="#">4:30 AM</a></li>
                            <li data-value="5:00 AM"><a href="#">5:00 AM</a></li>
                            <li data-value="5:30 AM"><a href="#">5:30 AM</a></li>
                            <li data-value="6:00 AM"><a href="#">6:00 AM</a></li>
                            <li data-value="6:30 AM"><a href="#">6:30 AM</a></li>
                            <li data-value="7:00 AM"><a href="#">7:00 AM</a></li>
                            <li data-value="7:30 AM"><a href="#">7:30 AM</a></li>
                            <li data-value="8:00 AM"><a href="#">8:00 AM</a></li>
                            <li data-value="8:30 AM"><a href="#">8:30 AM</a></li>
                            <li data-value="9:00 AM"><a href="#">9:00 AM</a></li>
                            <li data-value="9:30 AM"><a href="#">9:30 AM</a></li>
                            <li data-value="10:00 AM"><a href="#">10:00 AM</a></li>
                            <li data-value="10:30 AM"><a href="#">10:30 AM</a></li>
                            <li data-value="11:00 AM"><a href="#">11:00 AM</a></li>
                            <li data-value="11:30 AM"><a href="#">11:30 AM</a></li>
                            <li data-value="12:00 PM"><a href="#">12:00 PM</a></li>
                            <li data-value="12:30 PM"><a href="#">12:30 PM</a></li>
                            <li data-value="1:00 PM"><a href="#">1:00 PM</a></li>
                            <li data-value="1:30 PM"><a href="#">1:30 PM</a></li>
                            <li data-value="2:00 PM"><a href="#">2:00 PM</a></li>
                            <li data-value="2:30 PM"><a href="#">2:30 PM</a></li>
                            <li data-value="3:00 PM"><a href="#">3:00 PM</a></li>
                            <li data-value="3:30 PM"><a href="#">3:30 PM</a></li>
                            <li data-value="4:00 PM"><a href="#">4:00 PM</a></li>
                            <li data-value="4:30 PM"><a href="#">4:30 PM</a></li>
                            <li data-value="5:00 PM"><a href="#">5:00 PM</a></li>
                            <li data-value="5:30 PM"><a href="#">5:30 PM</a></li>
                            <li data-value="6:00 PM"><a href="#">6:00 PM</a></li>
                            <li data-value="6:30 PM"><a href="#">6:30 PM</a></li>
                            <li data-value="7:00 PM"><a href="#">7:00 PM</a></li>
                            <li data-value="7:30 PM"><a href="#">7:30 PM</a></li>
                            <li data-value="8:00 PM"><a href="#">8:00 PM</a></li>
                            <li data-value="8:30 PM"><a href="#">8:30 PM</a></li>
                            <li data-value="9:00 PM"><a href="#">9:00 PM</a></li>
                            <li data-value="9:30 PM"><a href="#">9:30 PM</a></li>
                            <li data-value="10:00 PM"><a href="#">10:00 PM</a></li>
                            <li data-value="10:30 PM"><a href="#">10:30 PM</a></li>
                            <li data-value="11:00 PM"><a href="#">11:00 PM</a></li>
                            <li data-value="11:30 PM"><a href="#">11:30 PM</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row timezone-container">
    <label class="col-sm-2 control-label scheduler-label">Timezone</label>
    <div class="col-xs-10 col-sm-10 col-md-10">
        <div class="btn-group selectlist timezone" data-resize="auto">
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                <span class="selected-label">(GMT-06:00) Central Standard Time</span>
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li data-name="Central Standard Time (no DST)" data-offset="-06:00"><a href="#">(GMT-06:00) Central Standard Time</a></li>
                <li data-name="Morocco Standard Time" data-offset="+00:00"><a href="#">(GMT) Casablanca *</a></li>
                <li data-name="GMT Standard Time" data-offset="+00:00"><a href="#">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London *</a></li>
                <li data-name="Greenwich Standard Time" data-offset="+00:00"><a href="#">(GMT) Monrovia, Reykjavik</a></li>
                <li data-name="W. Europe Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna *</a></li>
                <li data-name="Central Europe Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague *</a></li>
                <li data-name="Romance Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris *</a></li>
                <li data-name="Central European Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb *</a></li>
                <li data-name="W. Central Africa Standard Time" data-offset="+01:00"><a href="#">(GMT+01:00) West Central Africa</a></li>
                <li data-name="Jordan Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Amman *</a></li>
                <li data-name="GTB Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Athens, Bucharest, Istanbul *</a></li>
                <li data-name="Middle East Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Beirut *</a></li>
                <li data-name="Egypt Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Cairo *</a></li>
                <li data-name="South Africa Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Harare, Pretoria</a></li>
                <li data-name="FLE Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius *</a></li>
                <li data-name="Israel Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Jerusalem *</a></li>
                <li data-name="E. Europe Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Minsk *</a></li>
                <li data-name="Namibia Standard Time" data-offset="+02:00"><a href="#">(GMT+02:00) Windhoek *</a></li>
                <li data-name="Arabic Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Baghdad *</a></li>
                <li data-name="Arab Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Kuwait, Riyadh</a></li>
                <li data-name="Russian Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Moscow, St. Petersburg, Volgograd *</a></li>
                <li data-name="E. Africa Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Nairobi</a></li>
                <li data-name="Georgian Standard Time" data-offset="+03:00"><a href="#">(GMT+03:00) Tbilisi</a></li>
                <li data-name="Iran Standard Time" data-offset="+03:30"><a href="#">(GMT+03:30) Tehran *</a></li>
                <li data-name="Arabian Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Abu Dhabi, Muscat</a></li>
                <li data-name="Azerbaijan Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Baku *</a></li>
                <li data-name="Caucasus Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Caucasus Standard Time</a></li>
                <li data-name="Mauritius Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Port Louis *</a></li>
                <li data-name="Caucasus Standard Time" data-offset="+04:00"><a href="#">(GMT+04:00) Yerevan</a></li>
                <li data-name="Afghanistan Standard Time" data-offset="+04:30"><a href="#">(GMT+04:30) Kabul</a></li>
                <li data-name="Ekaterinburg Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Ekaterinburg *</a></li>
                <li data-name="Pakistan Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Islamabad, Karachi *</a></li>
                <li data-name="West Asia Standard Time" data-offset="+05:00"><a href="#">(GMT+05:00) Tashkent</a></li>
                <li data-name="India Standard Time" data-offset="+05:30"><a href="#">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</a></li>
                <li data-name="Sri Lanka Standard Time" data-offset="+05:30"><a href="#">(GMT+05:30) Sri Jayawardenepura</a></li>
                <li data-name="Nepal Standard Time" data-offset="+05:45"><a href="#">(GMT+05:45) Kathmandu</a></li>
                <li data-name="N. Central Asia Standard Time" data-offset="+06:00"><a href="#">(GMT+06:00) Almaty, Novosibirsk *</a></li>
                <li data-name="Central Asia Standard Time" data-offset="+06:00"><a href="#">(GMT+06:00) Astana, Dhaka</a></li>
                <li data-name="Myanmar Standard Time" data-offset="+06:00"><a href="#">(GMT+06:30) Yangon (Rangoon)</a></li>
                <li data-name="SE Asia Standard Time" data-offset="+07:00"><a href="#">(GMT+07:00) Bangkok, Hanoi, Jakarta</a></li>
                <li data-name="North Asia Standard Time" data-offset="+07:00"><a href="#">(GMT+07:00) Krasnoyarsk *</a></li>
                <li data-name="China Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</a></li>
                <li data-name="North Asia East Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Irkutsk, Ulaan Bataar *</a></li>
                <li data-name="Singapore Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Kuala Lumpur, Singapore</a></li>
                <li data-name="W. Australia Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Perth *</a></li>
                <li data-name="Taipei Standard Time" data-offset="+08:00"><a href="#">(GMT+08:00) Taipei</a></li>
                <li data-name="Tokyo Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Osaka, Sapporo, Tokyo</a></li>
                <li data-name="Korea Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Seoul</a></li>
                <li data-name="Yakutsk Standard Time" data-offset="+09:00"><a href="#">(GMT+09:00) Yakutsk *</a></li>
                <li data-name="Cen. Australia Standard Time" data-offset="+09:30"><a href="#">(GMT+09:30) Adelaide *</a></li>
                <li data-name="AUS Central Standard Time" data-offset="+09:30"><a href="#">(GMT+09:30) Darwin</a></li>
                <li data-name="E. Australia Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Brisbane</a></li>
                <li data-name="AUS Eastern Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Canberra, Melbourne, Sydney *</a></li>
                <li data-name="West Pacific Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Guam, Port Moresby</a></li>
                <li data-name="Tasmania Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Hobart *</a></li>
                <li data-name="Vladivostok Standard Time" data-offset="+10:00"><a href="#">(GMT+10:00) Vladivostok *</a></li>
                <li data-name="Central Pacific Standard Time" data-offset="+11:00"><a href="#">(GMT+11:00) Magadan, Solomon Is., New Caledonia</a></li>
                <li data-name="New Zealand Standard Time" data-offset="+12:00"><a href="#">(GMT+12:00) Auckland, Wellington *</a></li>
                <li data-name="Fiji Standard Time" data-offset="+12:00"><a href="#">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</a></li>
                <li data-name="Tonga Standard Time" data-offset="+12:00"><a href="#">(GMT+13:00) Nukualofa</a></li>
                <li data-name="Azores Standard Time" data-offset="+12:00"><a href="#">(GMT-01:00) Azores *</a></li>
                <li data-name="Cape Verde Standard Time" data-offset="-01:00"><a href="#">(GMT-01:00) Cape Verde Is.</a></li>
                <li data-name="Mid-Atlantic Standard Time" data-offset="-02:00"><a href="#">(GMT-02:00) Mid-Atlantic *</a></li>
                <li data-name="E. South America Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Brasilia *</a></li>
                <li data-name="Argentina Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Buenos Aires *</a></li>
                <li data-name="SA Western Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Georgetown</a></li>
                <li data-name="Greenland Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Greenland *</a></li>
                <li data-name="Montevideo Standard Time" data-offset="-03:00"><a href="#">(GMT-03:00) Montevideo *</a></li>
                <li data-name="Newfoundland Standard Time" data-offset="-03:00"><a href="#">(GMT-03:30) Newfoundland *</a></li>
                <li data-name="Atlantic Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Atlantic Time (Canada) *</a></li>
                <li data-name="SA Western Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) La Paz</a></li>
                <li data-name="Central Brazilian Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Manaus *</a></li>
                <li data-name="Pacific SA Standard Time" data-offset="-04:00"><a href="#">(GMT-04:00) Santiago *</a></li>
                <li data-name="Venezuela Standard Time" data-offset="-04:30"><a href="#">(GMT-04:30) Caracas</a></li>
                <li data-name="SA Pacific Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</a></li>
                <li data-name="Eastern Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Eastern Time (US &amp; Canada) *</a></li>
                <li data-name="US Eastern Standard Time" data-offset="-05:00"><a href="#">(GMT-05:00) Indiana (East)</a></li>
                <li data-name="Central America Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Central America</a></li>
                <li data-name="Central Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Central Time (US &amp; Canada) *</a></li>
                <li data-name="Central Standard Time (Mexico)" data-offset="-06:00"><a href="#">(GMT-06:00) Guadalajara, Mexico City, Monterrey - New *</a></li>
                <li data-name="Central Standard Time (Mexico)" data-offset="-06:00"><a href="#">(GMT-06:00) Guadalajara, Mexico City, Monterrey - Old</a></li>
                <li data-name="Canada Central Standard Time" data-offset="-06:00"><a href="#">(GMT-06:00) Saskatchewan</a></li>
                <li data-name="US Mountain Standard Time" data-offset="-07:00"><a href="#">(GMT-07:00) Arizona</a></li>
                <li data-name="Mountain Standard Time (Mexico)" data-offset="-07:00"><a href="#">(GMT-07:00) Chihuahua, La Paz, Mazatlan - New *</a></li>
                <li data-name="Mountain Standard Time (Mexico)" data-offset="-07:00"><a href="#">(GMT-07:00) Chihuahua, La Paz, Mazatlan - Old</a></li>
                <li data-name="Mountain Standard Time" data-offset="-07:00"><a href="#">(GMT-07:00) Mountain Time (US &amp; Canada) *</a></li>
                <li data-name="Pacific Standard Time" data-offset="-08:00"><a href="#">(GMT-08:00) Pacific Time (US &amp; Canada) *</a></li>
                <li data-name="Pacific Standard Time (Mexico)" data-offset="-08:00"><a href="#">(GMT-08:00) Tijuana, Baja California *</a></li>
                <li data-name="Alaskan Standard Time" data-offset="-09:00"><a href="#">(GMT-09:00) Alaska *</a></li>
                <li data-name="Hawaiian Standard Time" data-offset="-10:00"><a href="#">(GMT-10:00) Hawaii</a></li>
                <li data-name="Samoa Standard Time" data-offset="-11:00"><a href="#">(GMT-11:00) Midway Island, Samoa</a></li>
                <li data-name="Dateline Standard Time" data-offset="-12:00"><a href="#">(GMT-12:00) International Date Line West</a></li>
            </ul>
            <input type="text" aria-hidden="true" class="hidden hidden-field" name="TimeZoneSelectlist" readonly="readonly">
        </div>
    </div>
</div>

<div class="row repeat-container">
    <label class="col-sm-2 control-label scheduler-label">Repeat</label>
    <div class="col-sm-10">

        <div class="form-group repeat-interval">
            <div class="btn-group selectlist pull-left repeat-options" data-resize="auto">
                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                    <span class="selected-label">None (run once)</span>
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    <li data-value="none"><a href="#">None (run once)</a></li>
                    <li data-value="secondly" data-text="second(s)"><a href="#">Per Second</a>
                    <li data-value="minutely" data-text="minute(s)"><a href="#">Per Minute</a>
                    <li data-value="hourly" data-text="hour(s)"><a href="#">Hourly</a></li>
                    <li data-value="daily" data-text="day(s)"><a href="#">Daily</a></li>
                    <li data-value="weekdays"><a href="#">Weekdays</a></li>
                    <li data-value="weekly" data-text="week(s)"><a href="#">Weekly</a></li>
                    <li data-value="monthly" data-text="month(s)"><a href="#">Monthly</a></li>
                    <li data-value="yearly"><a href="#">Yearly</a></li>
                </ul>
                <input type="text" aria-hidden="true" class="hidden hidden-field" name="intervalSelectlist" readonly="readonly">
            </div>

            <div class="repeat-panel repeat-every-panel repeat-hourly repeat-daily repeat-weekly hide" aria-hidden="true">
                <label class="inline-form-text repeat-every-pretext" id="MySchedulerEveryLabel">every</label>

                <div class="spinbox digits-3 repeat-every">
                    <input class="form-control input-mini spinbox-input" type="text" aria-labelledby="MySchedulerEveryLabel">
                    <div class="spinbox-buttons btn-group btn-group-vertical">
                        <button class="btn btn-default spinbox-up btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-up"></span><span class="sr-only">Increase</span>
                        </button>
                        <button class="btn btn-default spinbox-down btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-down"></span><span class="sr-only">Decrease</span>
                        </button>
                    </div>
                </div>

                <div class="inline-form-text repeat-every-text"></div>
            </div>
        </div>

        <div class="form-group repeat-panel repeat-weekly repeat-days-of-the-week hide" aria-hidden="true">
            <fieldset class="btn-group" data-toggle="buttons">
                <label class="btn btn-default"><input data-value="SU" type="checkbox">Sun</label>
                <label class="btn btn-default"><input data-value="MO" type="checkbox">Mon</label>
                <label class="btn btn-default"><input data-value="TU" type="checkbox">Tue</label>
                <label class="btn btn-default"><input data-value="WE" type="checkbox"> Wed</label>
                <label class="btn btn-default"><input data-value="TH" type="checkbox"> Thu</label>
                <label class="btn btn-default"><input data-value="FR" type="checkbox"> Fri</label>
                <label class="btn btn-default"><input data-value="SA" type="checkbox"> Sat</label>
            </fieldset>
        </div>

        <div class="repeat-panel repeat-monthly hide" aria-hidden="true">
            <div class="form-group repeat-monthly-date">
                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-monthly" type="radio" checked="checked" value="bymonthday">
                        <span class="radio-label">on day</span>
                    </label>
                </div>

                <div class="btn-group selectlist pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">1</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">1</a></li>
                        <li data-value="2"><a href="#">2</a></li>
                        <li data-value="3"><a href="#">3</a></li>
                        <li data-value="4"><a href="#">4</a></li>
                        <li data-value="5"><a href="#">5</a></li>
                        <li data-value="6"><a href="#">6</a></li>
                        <li data-value="7"><a href="#">7</a></li>
                        <li data-value="8"><a href="#">8</a></li>
                        <li data-value="9"><a href="#">9</a></li>
                        <li data-value="10"><a href="#">10</a></li>
                        <li data-value="11"><a href="#">11</a></li>
                        <li data-value="12"><a href="#">12</a></li>
                        <li data-value="13"><a href="#">13</a></li>
                        <li data-value="14"><a href="#">14</a></li>
                        <li data-value="15"><a href="#">15</a></li>
                        <li data-value="16"><a href="#">16</a></li>
                        <li data-value="17"><a href="#">17</a></li>
                        <li data-value="18"><a href="#">18</a></li>
                        <li data-value="19"><a href="#">19</a></li>
                        <li data-value="20"><a href="#">20</a></li>
                        <li data-value="21"><a href="#">21</a></li>
                        <li data-value="22"><a href="#">22</a></li>
                        <li data-value="23"><a href="#">23</a></li>
                        <li data-value="24"><a href="#">24</a></li>
                        <li data-value="25"><a href="#">25</a></li>
                        <li data-value="26"><a href="#">26</a></li>
                        <li data-value="27"><a href="#">27</a></li>
                        <li data-value="28"><a href="#">28</a></li>
                        <li data-value="29"><a href="#">29</a></li>
                        <li data-value="30"><a href="#">30</a></li>
                        <li data-value="31"><a href="#">31</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>
            </div>

            <div class="repeat-monthly-day form-group">
                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-monthly" type="radio" checked="checked" value="bysetpos">
                        <span class="radio-label">on the</span>
                    </label>
                </div>

                <div class="btn-group selectlist month-day-pos pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">First</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">First</a></li>
                        <li data-value="2"><a href="#">Second</a></li>
                        <li data-value="3"><a href="#">Third</a></li>
                        <li data-value="4"><a href="#">Fourth</a></li>
                        <li data-value="-1"><a href="#">Last</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist month-days pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Sunday</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="SU"><a href="#">Sunday</a></li>
                        <li data-value="MO"><a href="#">Monday</a></li>
                        <li data-value="TU"><a href="#">Tuesday</a></li>
                        <li data-value="WE"><a href="#">Wednesday</a></li>
                        <li data-value="TH"><a href="#">Thursday</a></li>
                        <li data-value="FR"><a href="#">Friday</a></li>
                        <li data-value="SA"><a href="#">Saturday</a></li>
                        <li data-value="SU,MO,TU,WE,TH,FR,SA"><a href="#">Day</a></li>
                        <li data-value="MO,TU,WE,TH,FR"><a href="#">Weekday</a></li>
                        <li data-value="SU,SA"><a href="#">Weekend day</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

            </div>
        </div>

        <div class="repeat-panel repeat-yearly hide" aria-hidden="true">
            <div class="form-group repeat-yearly-date">

                <div class="radio pull-left">
                    <label class="radio-custom">
                        <input class="sr-only" name="repeat-yearly" type="radio" checked="checked" value="bymonthday">
                        <span class="radio-label">on</span>
                    </label>
                </div>

                <div class="btn-group selectlist year-month pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">January</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">January</a></li>
                        <li data-value="2"><a href="#">February</a></li>
                        <li data-value="3"><a href="#">March</a></li>
                        <li data-value="4"><a href="#">April</a></li>
                        <li data-value="5"><a href="#">May</a></li>
                        <li data-value="6"><a href="#">June</a></li>
                        <li data-value="7"><a href="#">July</a></li>
                        <li data-value="8"><a href="#">August</a></li>
                        <li data-value="9"><a href="#">September</a></li>
                        <li data-value="10"><a href="#">October</a></li>
                        <li data-value="11"><a href="#">November</a></li>
                        <li data-value="12"><a href="#">December</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist year-month-day pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">1</span>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">1</a></li>
                        <li data-value="2"><a href="#">2</a></li>
                        <li data-value="3"><a href="#">3</a></li>
                        <li data-value="4"><a href="#">4</a></li>
                        <li data-value="5"><a href="#">5</a></li>
                        <li data-value="6"><a href="#">6</a></li>
                        <li data-value="7"><a href="#">7</a></li>
                        <li data-value="8"><a href="#">8</a></li>
                        <li data-value="9"><a href="#">9</a></li>
                        <li data-value="10"><a href="#">10</a></li>
                        <li data-value="11"><a href="#">11</a></li>
                        <li data-value="12"><a href="#">12</a></li>
                        <li data-value="13"><a href="#">13</a></li>
                        <li data-value="14"><a href="#">14</a></li>
                        <li data-value="15"><a href="#">15</a></li>
                        <li data-value="16"><a href="#">16</a></li>
                        <li data-value="17"><a href="#">17</a></li>
                        <li data-value="18"><a href="#">18</a></li>
                        <li data-value="19"><a href="#">19</a></li>
                        <li data-value="20"><a href="#">20</a></li>
                        <li data-value="21"><a href="#">21</a></li>
                        <li data-value="22"><a href="#">22</a></li>
                        <li data-value="23"><a href="#">23</a></li>
                        <li data-value="24"><a href="#">24</a></li>
                        <li data-value="25"><a href="#">25</a></li>
                        <li data-value="26"><a href="#">26</a></li>
                        <li data-value="27"><a href="#">27</a></li>
                        <li data-value="28"><a href="#">28</a></li>
                        <li data-value="29"><a href="#">29</a></li>
                        <li data-value="30"><a href="#">30</a></li>
                        <li data-value="31"><a href="#">31</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="monthlySelectlist" readonly="readonly">
                </div>
            </div>

            <div class="form-group repeat-yearly-day">

                <div class="radio pull-left"><label class="radio-custom"><input class="sr-only" name="repeat-yearly" type="radio" value="bysetpos"> on the</label></div>

                <div class="btn-group selectlist year-month-day-pos pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">First</span>
                        <span class="caret"></span>
                        <span class="sr-only">First</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="1"><a href="#">First</a></li>
                        <li data-value="2"><a href="#">Second</a></li>
                        <li data-value="3"><a href="#">Third</a></li>
                        <li data-value="4"><a href="#">Fourth</a></li>
                        <li data-value="-1"><a href="#">Last</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDateSelectlist" readonly="readonly">
                </div>

                <div class="btn-group selectlist year-month-days pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Sunday</span>
                        <span class="caret"></span>
                        <span class="sr-only">Sunday</span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="SU"><a href="#">Sunday</a></li>
                        <li data-value="MO"><a href="#">Monday</a></li>
                        <li data-value="TU"><a href="#">Tuesday</a></li>
                        <li data-value="WE"><a href="#">Wednesday</a></li>
                        <li data-value="TH"><a href="#">Thursday</a></li>
                        <li data-value="FR"><a href="#">Friday</a></li>
                        <li data-value="SA"><a href="#">Saturday</a></li>
                        <li data-value="SU,MO,TU,WE,TH,FR,SA"><a href="#">Day</a></li>
                        <li data-value="MO,TU,WE,TH,FR"><a href="#">Weekday</a></li>
                        <li data-value="SU,SA"><a href="#">Weekend day</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDaySelectlist" readonly="readonly">
                </div>
                <div class="inline-form-text repeat-yearly-day-text"> of </div>

                <div class="btn-group selectlist year-month pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">January</span>
                        <span class="caret"></span>
                        <span class="sr-only">January</span>
                    </button>
                    <ul class="dropdown-menu" role="menu" style="height:200px; overflow:auto;">
                        <li data-value="1"><a href="#">January</a></li>
                        <li data-value="2"><a href="#">February</a></li>
                        <li data-value="3"><a href="#">March</a></li>
                        <li data-value="4"><a href="#">April</a></li>
                        <li data-value="5"><a href="#">May</a></li>
                        <li data-value="6"><a href="#">June</a></li>
                        <li data-value="7"><a href="#">July</a></li>
                        <li data-value="8"><a href="#">August</a></li>
                        <li data-value="9"><a href="#">September</a></li>
                        <li data-value="10"><a href="#">October</a></li>
                        <li data-value="11"><a href="#">November</a></li>
                        <li data-value="12"><a href="#">December</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="yearlyDaySelectlist" readonly="readonly">
                </div>
            </div>
        </div>
    </div>
</div>

<div class="row repeat-end hide" aria-hidden="true">
    <label class="col-sm-2 control-label scheduler-label">End</label>
    <div class="col-sm-10">
        <div class="row">
            <div class="col-xs-3 col-sm-3 col-lg-2 form-group">
                <div class="btn-group selectlist end-options pull-left" data-resize="auto">
                    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                        <span class="selected-label">Never</span>
                        <span class="caret"></span>
                        <span class="sr-only">Never</span>
                    </button>
                    <ul class="dropdown-menu" role="menu">
                        <li data-value="never"><a href="#">Never</a></li>
                        <li data-value="after"><a href="#">After</a></li>
                        <li data-value="date"><a href="#">On date</a></li>
                    </ul>
                    <input type="text" aria-hidden="true" class="hidden hidden-field" name="EndSelectlist" readonly="readonly">
                </div>
            </div>

            <div class="col-sm-4 col-lg-4 form-group end-option-panel end-after-panel pull-left hide" aria-hidden="true">
                <div class="spinbox digits-3 end-after">
                    <label class="sr-only" id="MyEndAfter">End After</label>
                    <input class="form-control input-mini spinbox-input" type="text" aria-labelledby="MyEndAfter">
                    <div class="spinbox-buttons btn-group btn-group-vertical">
                        <button class="btn btn-default spinbox-up btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-up"></span><span class="sr-only">Increase</span>
                        </button>
                        <button class="btn btn-default spinbox-down btn-xs" type="button">
                            <span class="glyphicon glyphicon-chevron-down"></span><span class="sr-only">Decrease</span>
                        </button>
                    </div>
                </div>
                <div class="inline-form-text end-after-text">occurrence(s)</div>
            </div>

            <div class="col-xs-4 col-sm-4 col-lg-4 form-group end-option-panel end-on-date-panel pull-left hide" aria-hidden="true">
                <div class="datepicker end-on-date">
                    <div class="input-group">
                        <input class="form-control" id="myEndDate" type="text"/>
                        <div class="input-group-btn">
                            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
                                <span class="glyphicon glyphicon-calendar"></span>
                                <span class="sr-only">Toggle Calendar</span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-right datepicker-calendar-wrapper" role="menu">
                                <div class="datepicker-calendar">
                                    <div class="datepicker-calendar-header">
                                        <button class="prev" type="button"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous Month</span></button>
                                        <button class="next" type="button"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next Month</span></button>
                                        <button class="title" type="button">
                                            <span class="month">
                                                <span data-month="0">January</span>
                                                <span data-month="1">February</span>
                                                <span data-month="2">March</span>
                                                <span data-month="3">April</span>
                                                <span data-month="4">May</span>
                                                <span data-month="5">June</span>
                                                <span data-month="6">July</span>
                                                <span data-month="7">August</span>
                                                <span data-month="8">September</span>
                                                <span data-month="9">October</span>
                                                <span data-month="10">November</span>
                                                <span data-month="11">December</span>
                                            </span> <span class="year"></span>
                                        </button>
                                    </div>
                                    <table class="datepicker-calendar-days">
                                        <thead>
                                        <tr>
                                            <th>Su</th>
                                            <th>Mo</th>
                                            <th>Tu</th>
                                            <th>We</th>
                                            <th>Th</th>
                                            <th>Fr</th>
                                            <th>Sa</th>
                                        </tr>
                                        </thead>
                                        <tbody></tbody>
                                    </table>
                                    <div class="datepicker-calendar-footer">
                                        <button class="datepicker-today" type="button">Today</button>
                                    </div>
                                </div>
                                <div class="datepicker-wheels" aria-hidden="true">
                                    <div class="datepicker-wheels-month">
                                        <h2 class="header">Month</h2>
                                        <ul>
                                            <li data-month="0"><button type="button">Jan</button></li>
                                            <li data-month="1"><button type="button">Feb</button></li>
                                            <li data-month="2"><button type="button">Mar</button></li>
                                            <li data-month="3"><button type="button">Apr</button></li>
                                            <li data-month="4"><button type="button">May</button></li>
                                            <li data-month="5"><button type="button">Jun</button></li>
                                            <li data-month="6"><button type="button">Jul</button></li>
                                            <li data-month="7"><button type="button">Aug</button></li>
                                            <li data-month="8"><button type="button">Sep</button></li>
                                            <li data-month="9"><button type="button">Oct</button></li>
                                            <li data-month="10"><button type="button">Nov</button></li>
                                            <li data-month="11"><button type="button">Dec</button></li>
                                        </ul>
                                    </div>
                                    <div class="datepicker-wheels-year">
                                        <h2 class="header">Year</h2>
                                        <ul></ul>
                                    </div>
                                    <div class="datepicker-wheels-footer clearfix">
                                        <button class="btn datepicker-wheels-back" type="button"><span class="glyphicon glyphicon-arrow-left"></span><span class="sr-only">Return to Calendar</span></button>
                                        <button class="btn datepicker-wheels-select" type="button">Select <span class="sr-only">Month and Year</span></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</div>
  

ScrollSpy scrollspy.js

Example in navbar

The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.

@fat

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

@mdo

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

one

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

two

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

three

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.

Usage

Requires Bootstrap nav

Scrollspy currently requires the use of a Bootstrap nav component for proper highlighting of active links.

Resolvable ID targets required

Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the DOM like <div id="home"></div>.

Non-:visible target elements ignored

Target elements that are not :visible according to jQuery will be ignored and their corresponding nav items will never be highlighted.

Requires relative positioning

No matter the implementation method, scrollspy requires the use of position: relative; on the element you're spying on. In most cases this is the <body>. When scrollspying on elements other than the <body>, be sure to have a height set and overflow-y: scroll; applied.

Via data attributes

To easily add scrollspy behavior to your topbar navigation, add data-spy="scroll" to the element you want to spy on (most typically this would be the <body>). Then add the data-target attribute with the ID or class of the parent element of any Bootstrap .nav component.


body {
  position: relative;
}

<body data-spy="scroll" data-target="#navbar-example">
  ...
  <div id="navbar-example">
    <ul class="nav nav-tabs" role="tablist">
      ...
    </ul>
  </div>
  ...
</body>

Via JavaScript

After adding position: relative; in your CSS, call the scrollspy via JavaScript:


$('body').scrollspy({ target: '#navbar-example' })

Methods

.scrollspy('refresh')

When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:


$('[data-spy="scroll"]').each(function () {
  var $spy = $(this).scrollspy('refresh')
})

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".

Name type default description
offset number 10 Pixels to offset from top when calculating position of scroll.

Events

Event Type Description
activate.bs.scrollspy This event fires whenever a new item becomes activated by the scrollspy.

$('#myScrollspy').on('activate.bs.scrollspy', function () {
  // do something…
})

Search search.js

Combines an input and a button to fire the searched event.

Usage

This function includes a simple input and button group that styles with a search icon and fires the searched event.

Via JavaScript:

Call the search control via JavaScript:

$('#mySearch').search();

Via data-attributes

To enable the search control without writing JavaScript, add data-initialize="search" to the .search element that you wish to initialize. Such elements that exist when $.ready() executes will be initialized. Any search markup that is programmatically created with data-initialize="search" sometime after the initial page load will not immediately initialize. Rather, it will initialize when the mousedown event is fired on it.

Markup

Wrap class="search" around an input and a button within a class="fuelux" container.


<div class="search input-group" id="mySearch" role="search">
  <input class="form-control" type="search" placeholder="Search"/>
  <span class="input-group-btn">
    <button class="btn btn-default" type="button">
      <span class="glyphicon glyphicon-search"></span>
      <span class="sr-only">Search</span>
    </button>
  </span>
</div>

Methods

.search('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.search('disable')
Ensures the search component is disabled
.search('enable')
Ensures the search component is enabled

Events

Event Type Description
searched.fu.search This event fires when a user presses Enter within the input or clicks the button.
cleared.fu.search This event fires when the user clears the input.

All search events are fired on the .search classed element.


$('#mySearch').on('searched.fu.search', function () {
  // load search results
});

Examples

Wrap the input and search button within .fuelux .search

Sample Methods

Selectlist selectlist.js

A single select drop-down similar to the native select control, but standardized to look the same across browsers.

Usage

Via JavaScript

Call the selectlist control via JavaScript:

$('#mySelectlist').selectlist();

Via data-attributes

Add data-initialize="selectlist" to the .selectlist element that you wish to initialize on $.ready(). Any selectlist that is programmatically generated after the initial page load will initialize when the mousedown event is fired on it if it has data-initialize="selectlist".

Markup

Wrap class="selectlist" around an input and a button within a class="fuelux" container.


<div class="btn-group selectlist" id="mySelectlist" data-resize="auto" data-initialize="selectlist">
  <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">
    <span class="selected-label">&nbsp;</span>
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li data-value="1"><a href="#">One</a></li>
    ...
  </ul>
  <input class="hidden hidden-field" name="mySelectlist" readonly="readonly" aria-hidden="true" type="text"/>
</div>

Methods

.selectlist('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
.selectlist('disable')
Ensures the component is disabled
.selectlist('enable')
Ensures the component is enabled
.selectlist('selectedItem')
Returns an object containing the jQuery data() contents of the selected item. This data includes .data-* attributes plus a text property with the visible text from the item.
.selectlist('selectByIndex')
Set the selected item based on its index in the list (zero-based index). Convenience method for .selectBySelector('li:eq({index})')
$('#mySelectlist').selectlist('selectByIndex', 1);
.selectlist('selectByText')
Set the selected item based on its text value
$('#mySelectlist').selectlist('selectByText', 'Four');
.selectlist('selectBySelector')
Set the selected item based on a selector
$('#mySelectlist').selectlist('selectBySelector', 'li[data-fizz=buzz]');
.selectlist('selectByValue')
Set the selected item based on its data-value attribute value. Convenience method for .selectBySelector('data-value={value}').
$('#mySelectlist').selectlist('selectByValue', 'foo');

Events

Event Type Description
changed.fu.selectlist This event fires when the value changes by selecting an item from the list. Arguments include event, data where data represents the same object structure returned by the selectedItem method.

All selectlist events are fired on the .selectlist classed element.


$('#mySelectlist').on('changed.fu.selectlist', function () {
  // do something
});

Examples

A single select drop-down similar to the native select control. Wrap the input and selectlist button within .fuelux .selectlist


Sample Methods (output sent to browser console)

Spinbox spinbox.js

Spinbox includes an enhanced numeric input based upon the native <input type="number">.

Usage

A spinbox allows for click interaction with a numeric input.

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

Via JavaScript

Call the selectlist control via JavaScript:

$('#mySpinbox').spinbox();

Via data-attributes

To enable the spinbox control without writing JavaScript, add data-initialize="spinbox" to the .spinbox element that you wish to initialize. Such elements that exist when $.ready() executes will be initialized. Any spinbox markup that is programmatically created with data-initialize="spinbox" sometime after the initial page load will not immediately initialize. Rather, it will initialize when the mousedown event is fired on it.

Markup

Add class="spinbox" to a div within a class="fuelux" container.


<div class="spinbox" id="mySpinbox" data-initialize="spinbox">
  <input class="form-control input-mini spinbox-input" type="text">
  <div class="spinbox-buttons btn-group btn-group-vertical">
    <button class="btn btn-default spinbox-up btn-xs" type="button">
      <span class="glyphicon glyphicon-chevron-up"></span><span class="sr-only">Increase</span>
    </button>
    <button class="btn btn-default spinbox-down btn-xs" type="button">
      <span class="glyphicon glyphicon-chevron-down"></span><span class="sr-only">Decrease</span>
    </button>
  </div>
</div>

Methods

.spinbox('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup.
$('#mySpinbox').spinbox('destroy');
.spinbox('getIntValue')
Returns spinner value as a JS number (so, if spinner is set to "12,1px" it will return 12.1)
.spinbox('getValue')
Alias for .spinbox('value')
.spinbox('setValue')
Alias for .spinbox('value', number)
.spinbox('value')
Sets or returns the spinner value
$('#mySpinbox').spinbox('value') 
$('#mySpinbox').spinbox('value', 11) 

If value contains non-integers, the value returns as a string. Otherwise, the value returns as a number.

Options

Options that can be passed in via JavaScript once at initialization.

Name type default description
value number 1 Sets the initial spinbox value
min number 1 Sets the minimum spinbox value
max number 999 Sets the maximum spinbox value
step number 1 Sets the increment by which the value in the spinbox will change each time the spinbox buttons are pressed
limitToStep boolean false Limits the spinner value to increments of the step value. Eg. If step is 5, spinner values will be limited to increments of 5, (0, 5, 10, 15...)
hold boolean true If true, the spinbox will react to its buttons being pressed and held down
hold boolean true If true, the spinbox will react to its buttons being pressed and held down
speed string "medium" Assigns spinbox speed when buttons are held down. Options include "fast","medium","slow".
disabled boolean false Creates a disables spinbox.
units array [] Units that will be allowed to appear and be typed into the spinbox input along with the numeric value. For example, setting units to a value of ['px', 'en', 'xx'] would allow px, en, and xx units to appear within the spinbox input

Events

Event Type Description
changed.fu.spinbox This event fires when the value changes (either by selecting an item from the list or updating the input value directly). Arguments include event, value where value is the current value of the spinner. Returns the current value of the spinner.

All spinbox events are fired on the .spinbox classed element.


$('#mySpinbox').on('changed.fu.spinbox', function () {
  // do something
})

Example

Spinbox includes an enhanced numeric input based upon the native <input type="number">. Wrap the input and the increment/decrement buttons within .fuelux .spinbox

Sample Methods

Togglable tabs tab.js

Example tabs

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus. Nested tabs are not supported.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

Extends tabbed navigation

This plugin extends the tabbed navigation component to add tabbable areas.

Usage

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):


$('#myTabs a').click(function (e) {
  e.preventDefault()
  $(this).tab('show')
})

You can activate individual tabs in several ways:


$('#myTabs a[href="#profile"]').tab('show') // Select tab by name
$('#myTabs a:first').tab('show') // Select first tab
$('#myTabs a:last').tab('show') // Select last tab
$('#myTabs li:eq(2) a').tab('show') // Select third tab (0-indexed)

Markup

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling, while adding the nav and nav-pills classes will apply pill styling.


<div>

  <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li class="active" role="presentation"><a data-toggle="tab" href="#home" aria-controls="home" role="tab">Home</a></li>
    <li role="presentation"><a data-toggle="tab" href="#profile" aria-controls="profile" role="tab">Profile</a></li>
    <li role="presentation"><a data-toggle="tab" href="#messages" aria-controls="messages" role="tab">Messages</a></li>
    <li role="presentation"><a data-toggle="tab" href="#settings" aria-controls="settings" role="tab">Settings</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div class="tab-pane active" id="home" role="tabpanel">...</div>
    <div class="tab-pane" id="profile" role="tabpanel">...</div>
    <div class="tab-pane" id="messages" role="tabpanel">...</div>
    <div class="tab-pane" id="settings" role="tabpanel">...</div>
  </div>

</div>

Fade effect

To make tabs fade in, add .fade to each .tab-pane. The first tab pane must also have .in to make the initial content visible.


<div class="tab-content">
  <div class="tab-pane fade in active" id="home" role="tabpanel">...</div>
  <div class="tab-pane fade" id="profile" role="tabpanel">...</div>
  <div class="tab-pane fade" id="messages" role="tabpanel">...</div>
  <div class="tab-pane fade" id="settings" role="tabpanel">...</div>
</div>

Methods

$().tab

Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. In the above examples, the tabs are the <a>s with data-toggle="tab" attributes.

.tab('show')

Selects the given tab and shows its associated content. Any other tab that was previously selected becomes unselected and its associated content is hidden. Returns to the caller before the tab pane has actually been shown (i.e. before the shown.bs.tab event occurs).

$('#someTab').tab('show')

Events

When showing a new tab, the events fire in the following order:

  1. hide.bs.tab (on the current active tab)
  2. show.bs.tab (on the to-be-shown tab)
  3. hidden.bs.tab (on the previous active tab, the same one as for the hide.bs.tab event)
  4. shown.bs.tab (on the newly-active just-shown tab, the same one as for the show.bs.tab event)

If no tab was already active, then the hide.bs.tab and hidden.bs.tab events will not be fired.

Event Type Description
show.bs.tab This event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
shown.bs.tab This event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
hide.bs.tab This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use event.target and event.relatedTarget to target the current active tab and the new soon-to-be-active tab, respectively.
hidden.bs.tab This event fires after a new tab is shown (and thus the previous active tab is hidden). Use event.target and event.relatedTarget to target the previous active tab and the new active tab, respectively.

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  e.target // newly activated tab
  e.relatedTarget // previous active tab
})

Tooltips tooltip.js

Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.

Tooltips with zero-length titles are never displayed.

Examples

Hover over the links below to see tooltips:

Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral.

Static tooltip

Four options are available: top, right, bottom, and left aligned.

Four directions


<button class="btn btn-default" data-toggle="tooltip" data-placement="left" type="button" title="Tooltip on left">Tooltip on left</button>

<button class="btn btn-default" data-toggle="tooltip" data-placement="top" type="button" title="Tooltip on top">Tooltip on top</button>

<button class="btn btn-default" data-toggle="tooltip" data-placement="bottom" type="button" title="Tooltip on bottom">Tooltip on bottom</button>

<button class="btn btn-default" data-toggle="tooltip" data-placement="right" type="button" title="Tooltip on right">Tooltip on right</button>

Opt-in functionality

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

One way to initialize all tooltips on a page would be to select them by their data-toggle attribute:


$(function () {
  $('[data-toggle="tooltip"]').tooltip()
})

Usage

The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.

Trigger the tooltip via JavaScript:


$('#example').tooltip(options)

Markup

The required markup for a tooltip is only a data attribute and title on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to top by the plugin).


<!-- HTML to write -->
<a data-toggle="tooltip" href="#" title="Some tooltip text!">Hover over me</a>

<!-- Generated markup by the plugin -->
<div class="tooltip top" role="tooltip">
  <div class="tooltip-arrow"></div>
  <div class="tooltip-inner">
    Some tooltip text!
  </div>
</div>

Multiple-line links

Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add white-space: nowrap; to your anchors to avoid this.

Tooltips in button groups, input groups, and tables require special setting

When using tooltips on elements within a .btn-group or an .input-group, or on table-related elements (<td>, <th>, <tr>, <thead>, <tbody>, <tfoot>), you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).

Don't try to show tooltips on hidden elements

Invoking $(...).tooltip('show') when the target element is display: none; will cause the tooltip to be incorrectly positioned.

Accessible tooltips for keyboard and assistive technology users

For users navigating with a keyboard, and in particular users of assistive technologies, you should only add tooltips to keyboard-focusable elements such as links, form controls, or any arbitrary element with a tabindex="0" attribute.

Tooltips on disabled elements require wrapper elements

To add a tooltip to a disabled or .disabled element, put the element inside of a <div> and apply the tooltip to that <div> instead.

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

Name Type Default Description
animation boolean true Apply a CSS fade transition to the tooltip
container string | false false

Appends the tooltip to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.

delay number | object 0

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { "show": 500, "hide": 100 }

html boolean false Insert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
placement string | function 'top'

How to position the tooltip - top | bottom | left | right | auto.
When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right.

When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the tooltip instance.

selector string false If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See this and an informative example.
template string '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'

Base HTML to use when creating the tooltip.

The tooltip's title will be injected into the .tooltip-inner.

.tooltip-arrow will become the tooltip's arrow.

The outermost wrapper element should have the .tooltip class.

title string | function ''

Default title value if title attribute isn't present.

If a function is given, it will be called with its this reference set to the element that the tooltip is attached to.

trigger string 'hover focus' How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. manual cannot be combined with any other trigger.
viewport string | object | function { selector: 'body', padding: 0 }

Keeps the tooltip within the bounds of this element. Example: viewport: '#viewport' or { "selector": "#viewport", "padding": 0 }

If a function is given, it is called with the triggering element DOM node as its only argument. The this context is set to the tooltip instance.

Data attributes for individual tooltips

Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.

Methods

$().tooltip(options)

Attaches a tooltip handler to an element collection.

.tooltip('show')

Reveals an element's tooltip. Returns to the caller before the tooltip has actually been shown (i.e. before the shown.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip. Tooltips with zero-length titles are never displayed.

$('#element').tooltip('show')

.tooltip('hide')

Hides an element's tooltip. Returns to the caller before the tooltip has actually been hidden (i.e. before the hidden.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip.

$('#element').tooltip('hide')

.tooltip('toggle')

Toggles an element's tooltip. Returns to the caller before the tooltip has actually been shown or hidden (i.e. before the shown.bs.tooltip or hidden.bs.tooltip event occurs). This is considered a "manual" triggering of the tooltip.

$('#element').tooltip('toggle')

.tooltip('destroy')

Hides and destroys an element's tooltip. Tooltips that use delegation (which are created using the selector option) cannot be individually destroyed on descendant trigger elements.

$('#element').tooltip('destroy')

Events

Event Type Description
show.bs.tooltip This event fires immediately when the show instance method is called.
shown.bs.tooltip This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.tooltip This event is fired immediately when the hide instance method has been called.
hidden.bs.tooltip This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
inserted.bs.tooltip This event is fired after the show.bs.tooltip event when the tooltip template has been added to the DOM.

$('#myTooltip').on('hidden.bs.tooltip', function () {
  // do something…
})

Transitions transition.js

About transitions

For simple transition effects, include transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

What's inside

Transition.js is a basic helper for transitionEnd events as well as a CSS transition emulator. It's used by the other plugins to check for CSS transition support and to catch hanging transitions.

Disabling transitions

Transitions can be globally disabled using the following JavaScript snippet, which must come after transition.js (or bootstrap.js or bootstrap.min.js, as the case may be) has loaded:


$.support.transition = false

Tree tree.js

Usage

The tree provides a categorical selection interface that allows for interaction and selection of nested elements.

Via JavaScript

Call the tree control via JavaScript:


dataSource = function(parentData, callback){
  //...
};

$('#myTree').tree({ dataSource: dataSource });

Methods

.tree('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup
.tree('selectedItems')
Returns an array containing selected items and associated data
.tree('selectItem', $('#itemId'))
Select the passed in non-folder item in the tree.
.tree('selectFolder', $('#itemId'))
Select the passed in folder item in the tree.
.tree('openFolder', $('#folderId'))
Open the targeted folder
.tree('closeFolder', $('#folderId'))
Close the targeted folder
.tree('toggleFolder', $('#folderId'))
Toggle the targeted folder (opened or closed)
.tree('closeAll')
Close all folders (collapse the entire tree).
.tree('discloseAll')
Disclose all folders (expand the entire tree).
.tree('discloseVisible')
Disclose only currently visible folders (expand already displayed folders).
.tree('populate', $el)
deprecated Populate the passed in element as if it were a new copy of the instantiated tree. If you call this on an already instantiated tree, it will append all of the items to the tree again. You probably don't want to call this. It will most likely become a private function in the future.
.tree('render')
Calls datasource callback for entire tree. Caution: Does not remove current top-level tree nodes.
.tree('refreshFolder', $('#folderId'))
Removes children and calls datasource callback for specified folder. Does not update data and attributes of the specified folder.
.tree('collapse')
deprecated Same as .tree('closeAll')

Options

You can pass options via data attributes or JavaScript. For data attributes, append the option name to data-. For example, you could use data-selected="".

Name type default description
multiSelect boolean false Allows multiple tree items to be selected at once
cacheItems boolean true Prevents refresh of sub-items when a user closes and reopens a folder
folderSelect boolean true Enables folder selection
ignoreRedundantOpens boolean false Makes openFolder() behave like toggleFolder() instead. Will be deprecated in 3.7.0 when openFolder() will only open the folder instead of toggling
disclosuresUpperLimit integer 0 How many times discloseAll() should be called before a stopping and firing an exceededDisclosuresLimit.fu.tree event. You can force it to continue by listening for this event, setting data-ignore-disclosures-limit to true and starting discloseAll() back up again. This lets you make more decisions about if/when/how/why/how many times discloseAll() will be started back up after it exceeds the limit.
    $tree.one('exceededDisclosuresLimit.fu.tree', function () {
        $tree.data('ignore-disclosures-limit', true);
        $tree.tree('discloseAll');
    });
disclusuresUpperLimit defaults to 0, so by default this trigger will never fire. The true hard the upper limit is the browser's ability to load new items (i.e. it will keep loading until the browser falls over and dies). On the Fuel UX index.html testing page, the point at which the page became super slow (enough to seem almost unresponsive) was 4, meaning 256 folders had been opened, and 1024 were attempting to open.

Required Data Source

The tree control requires an array of objects in order to create a tree. To determine what tree nodes to create, the tree control uses a callback function named datasource that returns an object with an array named data within it. Items in data will be created when a branch is opened. All tree nodes must be loaded into the control one folder (branch) at a time. However, one can store the entire tree from a single network request, and use the datasource function to parse this combined object and not make additional network requests. The following are reserved keys within each item object.

Key Type Description
text string Required. Text of tree node. *Please note: text replaces and deprecates name
type string Required. Options are folder or item.
attr object Unless it is a reserved key in this table, child keys will be added as attributes to .tree-item or .tree-branch.
attr.cssClass string CSS classes that will be added to .tree-item or .tree-branch
attr.data-icon string CSS classes that will be added to .icon-item
attr.id string Adds id to .tree-item or .tree-branch and adds ARIA support with aria-labelledby.
attr.hasChildren boolean Set to false to hide the chevron next to folders. Defaults to true.

Events

Event Type Description
selected.fu.tree Fires when a user selects an item or folder. Returns an object containing an array of the selected items' jQuery data and the jQuery data of the triggering item. { selected: [array], target: [object] }
deselected.fu.tree Fires when a user deselects an item or folder. Returns an object containing an array of the selected items' jQuery data and the jQuery data of the triggering item. { selected: [array], target: [object] }
loaded.fu.tree Fires when sub-content has been is loaded. Returns the jQuery element of the folder loaded.
updated.fu.tree Fires after selected.fu.tree and deselected.fu.tree events. Returns an object containing an array of selected items' jQuery data, the triggering jQuery element and the event type. { selected: [array], item: [object], eventType: [string] }
disclosedFolder.fu.tree Fires when a user opens a folder. Returns an object containing the jQuery data of the opened folder.
refreshedFolder.fu.tree Fires when a user refreshes a folder. Returns an object containing the jQuery data of the opened folder.
closed.fu.tree Fires when a user closes a folder. Returns an object containing the jQuery data of the closed folder.
closedAll.fu.tree Fires when all folders have finished closing. Returns an object containing an array of closed folders' jQuery data and the tree's jQuery element. The length of reportedClosed will provide the number of folders closed. { reportedClosed: [array], tree: [$element] }
disclosedVisible.fu.tree Fires when all visible folders have disclosed/opened. Returns an object containing an array of disclosed folders' jQuery data and the tree's jQuery element. The length of reportedOpened will provide the number of folders opened. { reportedOpened: [array], tree: [$element] }
exceededDisclosuresLimit.fu.tree Fires when tree halts disclosing due to hitting discloserLimit cap. Returns an object containing { disclosures: [number], tree: [$element] }
disclosedAll.fu.tree Fires when all folders have disclosed. It will not fire if tree stops disclosing due to hitting discloserLimit cap. Returns an object containing { disclosures: [number], tree: [$element] }

All tree events are triggered from the .tree classed element.


$('#myTree').on('selected.fu.tree', function (event, data) {
  // do something with data: { selected: [array], target: [object] }
})

Examples

Tree provides a categorical element selection. Use it to create a file system interface. Wrap the wrapper tree containers with .fuelux .tree

Please note the location of .glyphicon-play outside .tree-branch-name. The control allows folders to be selected by default unless the folderSelect option is set to false, which then requires slightly different markup ("Items selectable only," shown further below)


<ul class="tree tree-folder-select" id="myTree" role="tree">
  <li class="tree-branch hide" data-template="treebranch" role="treeitem" aria-expanded="false">
    <div class="tree-branch-header">
      <button class="glyphicon icon-caret glyphicon-play" type="button"><span class="sr-only">Open</span></button>
      <button class="tree-branch-name" type="button">
        <span class="glyphicon icon-folder glyphicon-folder-close"></span>
        <span class="tree-label"></span>
      </button>
    </div>
    <ul class="tree-branch-children" role="group"></ul>
    <div class="tree-loader" role="alert">Loading...</div>
  </li>
  <li class="tree-item hide" data-template="treeitem" role="treeitem">
    <button class="tree-item-name" type="button">
      <span class="glyphicon icon-item fueluxicon-bullet"></span>
      <span class="tree-label"></span>
    </button>
  </li>
</ul>

Please note the location of .glyphicon-play inside .tree-branch-name. This markup is used if the folderSelect option is set to false.


  <ul class="tree" id="myTree" role="tree">
    <li class="tree-branch hide" data-template="treebranch" role="treeitem" aria-expanded="false">
      <div class="tree-branch-header">
        <button class="tree-branch-name" type="button">
          <span class="glyphicon icon-caret glyphicon-play"></span>
          <span class="glyphicon icon-folder glyphicon-folder-close"></span>
          <span class="tree-label"></span>
        </button>
      </div>
      <ul class="tree-branch-children" role="group"></ul>
      <div class="tree-loader" role="alert">Loading...</div>
    </li>
    <li class="tree-item hide" data-template="treeitem" role="treeitem">
      <button class="tree-item-name" type="button">
        <span class="glyphicon icon-item fueluxicon-bullet"></span>
        <span class="tree-label"></span>
      </button>
    </li>
  </ul>
  

Wizard wizard.js

A wizard divides a complex goal into multiple steps by separating sub-tasks or content into panes. You can add or remove panes. Completed steps remain clickable.

  • 1Campaign
  • 2Recipients
  • 3Template

Setup Campaign

Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.

Choose Recipients

Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard.

Design Template

Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify.

Usage

Via JavaScript

$('#myWizard').wizard();

Via data-attributes

The wizard will automatically instantiate any wizards with data-initialize="wizard". If you add control markup after page load with data-initialize="wizard", this control initializes on mouseover.

Markup

Deprecated wizard markup

Before v3.8.0, the wizard control did not have a .steps-container element.

Wrap class="wizard" around a list of steps, navigation, and content within a class="fuelux" container.


<div class="wizard" id="myWizard" data-initialize="wizard">
<div class="steps-container">
	<ul class="steps">
		<li class="active" data-step="1" data-name="campaign">
			<span class="badge">1</span>Campaign
			<span class="chevron"></span>
		</li>
		<li data-step="2">
			<span class="badge">2</span>Recipients
			<span class="chevron"></span>
		</li>
		<li data-step="3" data-name="template">
			<span class="badge">3</span>Template
			<span class="chevron"></span>
		</li>
	</ul>
</div>
<div class="actions">
	<button class="btn btn-default btn-prev" type="button">
		<span class="glyphicon glyphicon-arrow-left"></span>Prev</button>
	<button class="btn btn-primary btn-next" data-last="Complete" type="button">Next
		<span class="glyphicon glyphicon-arrow-right"></span>
	</button>
</div>
<div class="step-content">
	<div class="step-pane active sample-pane alert" data-step="1">
		<h4>Setup Campaign</h4>
		<p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.</p>
	</div>
	<div class="step-pane sample-pane bg-info alert" data-step="2">
		<h4>Choose Recipients</h4>
		<p>Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard. </p>
	</div>
	<div class="step-pane sample-pane bg-danger alert" data-step="3">
		<h4>Design Template</h4>
		<p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify. </p>
	</div>
</div>


</div>

Data Attribute Options

For data attributes, append the option name to data-, as in data-restrict="".

Attribute Value Description
restrict previous Prevents the user from navigating to a previous step
step 1 Sets the current wizard step. Replace the value with a number of the wizard step to load on.

Options

You can pass options via Javascript upon initialization.

Name Type Default Description
disablePreviousStep boolean false Dictates whether the wizard should make the previous step button disabled. Setting this value to true will make the previous step button disabled
selectedItem object { step: -1 } By default { step: -1 } means it will attempt to look for "active" class in order to set the step. Changing the step number would set the step that is loaded by default when the wizard loads.

Methods

.wizard('destroy')
Removes all functionality, jQuery data, and the markup from the DOM. Returns string of control markup
.wizard('previous')
Moves to the previous step
.wizard('next')
Moves to the next step
.wizard('selectedItem')
Returns the current step index.
$('#myWizard').wizard('selectedItem');
.wizard('selectedItem', 3)
Moves to passed in step. This can be either an integer or the `data-name` of a step.
$('#myWizard').wizard('selectedItem', {
	step: 3
});

$('#myWizard').wizard('selectedItem', {
	step: "named item"
});
.wizard('addSteps')
Add a pane or an array of panes to a wizard. Wrap this markup with <div class="step-pane"></div>
$('#myWizard').wizard('addSteps', index, [
	{
		badge: 'badge-customicon',
		label: 'A Step Label',
		pane: '
Content
' } ]);
Parameter Description
index Required. Identifies the position used to start inserting pane(s). First pane exists at position 1. If you use -1, the item will append to end of the list of panes.
[item1, ..., itemX]
item1, ..., itemX
Identifies an array or list of content pane objects to add at the index. Each pane can contain three strings:
  • a badge class to be appended to the class attribute of the step in order to override the default number
  • a label for the name of the step
  • the pane of HTML content
.wizard('removeSteps')
Remove a pane or multiple panes from a wizard
$('#myWizard').wizard('removeSteps', index, howMany);
Parameter Description
index Required. Identifies the position where to begin removing pane(s). First pane exists at position 1.
howMany Optional. Specifies the number of panes to removed. Defaults to 1.

Events

Event Type Description
actionclicked.fu.wizard This event fires immediately when the step changes, but before the wizard shows the new step. Use event.preventDefault() to cancel the event. Arguments include event, data where data is an object { step:1, direction:'next' }.
changed.fu.wizard This event fires when the step changes and displays to the user.
finished.fu.wizard This event fires when the user clicks the next button on the last step of the wizard.
stepclicked.fu.wizard This event fires when the user clicks a completed step. Use event.preventDefault to cancel the event.

All wizard events are fired on the .wizard classed element.


$('#myWizard').on('actionclicked.fu.wizard', function (evt, data) {
	// do something
});

Examples

Wrap the input and wizard button within .fuelux .wizard

  • 1Campaign
  • 2Recipients
  • 3Template

Setup Campaign

Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.

Choose Recipients

Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard.

Design Template

Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify.

Sample Methods