Javascript and js plugins used in Boo Admin.
Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file.
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 body namespaced with `'data-api'`. This looks like this:
$('body').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:
$('body').off('.alert.data-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')
.
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.
All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.
$('#myModal').on('show', function (e) { if (!data) return e.preventDefault() // stops modal from being shown })
For detailed information about the bootstrap javascript framework to go first bootstrap documentation
All javascript files are located in the directory assets / js directory contains demo and lib. Plugins are installed in the assets / plugins.
In general each HTML page loads all these 39 .js files. In your project you can minify all these files into 1 or do anything you want, but in download package i included all files so you can easily edit/remove/add new files.
<script src="assets/js/lib/jquery.js"></script> <script src="assets/js/lib/jquery-ui.js"></script> <script src="assets/js/lib/jquery.cookie.js"></script> <script src="assets/js/lib/jquery.date.min.js"></script> <script src="assets/js/lib/jquery.mousewheel.js"></script> <script src="assets/js/lib/jquery.load-image.min.js"></script> <script src="assets/js/lib/bootstrap/bootstrap.js"></script> <!-- Plugins Bootstrap --> <script src="assets/plugins/bootstrap-wysihtml5/lib/js/wysihtml5-0.3.0.min.js"></script> <script src="assets/plugins/bootstrap-wysihtml5/src/bootstrap-wysihtml5.js"></script> <script src="assets/plugins/bootstrap-fuelux/js/all-fuelux.min.js"></script> <script src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script> <script src="assets/plugins/bootstrap-timepicker/js/bootstrap-timepicker.js"></script> <script src="assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> <script src="assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script> <script src="assets/plugins/bootstrap-daterangepicker/js/bootstrap-daterangepicker.js"></script> <script src="assets/plugins/bootstrap-toggle-button/js/bootstrap-toggle-button.js"></script> <script src="assets/plugins/bootstrap-fileupload/js/bootstrap-fileupload.js"></script> <script src="assets/plugins/bootstrap-rowlink/js/bootstrap-rowlink.js"></script> <script src="assets/plugins/bootstrap-progressbar/js/bootstrap-progressbar.js"></script> <script src="assets/plugins/bootstrap-select/bootstrap-select.js"></script> <script src="assets/plugins/bootstrap-multiselect/js/bootstrap-multiselect.js"></script> <script src="assets/plugins/bootstrap-bootbox/bootbox.min.js"></script> <script src="assets/plugins/bootstrap-modal/js/bootstrap-modalmanager.js"></script> <script src="assets/plugins/bootstrap-modal/js/bootstrap-modal.js"></script> <script src="assets/plugins/bootstrap-wizard/js/bootstrap-wizard-combi.js"></script> <script src="assets/plugins/bootstrap-image-gallery/js/bootstrap-image-gallery.min.js"></script> <!-- Plugins Custom - Only example --> <script src="assets/plugins/pl-extension/google-code-prettify/prettify.js"></script> <!-- Plugins Custom - System --> <script src="assets/plugins/pl-system/nicescroll/jquery.nicescroll.min.js"></script> <script src="assets/plugins/pl-system/xbreadcrumbs/xbreadcrumbs.js"></script> <!-- Plugins Custom - System info --> <script src="assets/plugins/pl-system-info/qtip2/dist/jquery.qtip.min.js"></script> <script src="assets/plugins/pl-system-info/gritter/js/jquery.gritter.min.js"></script> <script src="assets/plugins/pl-system-info/notyfy/jquery.notyfy.js"></script> <!-- Plugins Custom - Content --> <script src="assets/plugins/pl-content/list/js/list.min.js"></script> <script src="assets/plugins/pl-content/list/plugins/list.paging.min.js"></script> <script src="assets/plugins/pl-content/jpages/js/jPages.js"></script> <!-- Plugins Custom - Component --> <script src="assets/plugins/pl-component/fullcalendar/fullcalendar.min.js"></script> <script src="assets/plugins/pl-component/rangeslider/jqallrangesliders.min.js"></script> <!-- Plugins Custom - Form --> <script src="assets/plugins/pl-form/uniform/jquery.uniform.min.js"></script> <script src="assets/plugins/pl-form/select2/select2.min.js"></script> <script src="assets/plugins/pl-form/counter/jquery.counter.js"></script> <script src="assets/plugins/pl-form/elastic/jquery.elastic.js"></script> <script src="assets/plugins/pl-form/inputmask/jquery.inputmask.js"></script> <script src="assets/plugins/pl-form/inputmask/jquery.inputmask.extensions.js"></script> <script src="assets/plugins/pl-form/validate/js/jquery.validate.min.js"></script> <script src="assets/plugins/pl-form/duallistbox/jquery.dualListBox.min.js"></script> <!-- Plugins Custom - Gallery --> <script src="assets/plugins/pl-gallery/nailthumb/jquery.nailthumb.1.1.min.js"></script> <script src="assets/plugins/pl-gallery/nailthumb/showLoading/js/jquery.showLoading.min.js"></script> <script src="assets/plugins/pl-gallery/wookmark/jquery.imagesloaded.js"></script> <script src="assets/plugins/pl-gallery/wookmark/jquery.wookmark.min.js"></script> <!-- Plugins Tables --> <script src="assets/plugins/pl-table/datatables/media/js/jquery.dataTables.js"></script> <script src="assets/plugins/pl-table/datatables/plugin/jquery.dataTables.plugins.js"></script> <script src="assets/plugins/pl-table/datatables/plugin/jquery.dataTables.columnFilter.js"></script> <!-- Plugins data visualization --> <script src="assets/plugins/pl-visualization/sparkline/jquery.sparkline.min.js"></script> <script src="assets/plugins/pl-visualization/easy-pie-chart/jquery.easy-pie-chart.js"></script> <script src="assets/plugins/pl-visualization/percentageloader/percentageloader.min.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.categories.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.grow.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.orderBars.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.pie.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.resize.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.selection.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.stack.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.stackpercent.js"></script> <script src="assets/plugins/pl-visualization/flot/jquery.flot.time.js"></script> <!-- main js --> <script src="assets/js/core.js"></script> <script src="assets/js/application.js"></script> <!-- Only This Demo Page --> <script src="assets/js/demo/demo-form.js"></script> <script> $(document).ready(function() { }); </script>
Location of assets/plugins/bootstrap-...
What is the plan still to add:
<script src="assets/plugins/bootstrap-bootbox/bootbox.min.js"></script>
GlobalModalManager
variable.<script src="assets/plugins/bootstrap-modal/js/bootstrap-modalmanager.js"></script> <script src="assets/plugins/bootstrap-modal/js/bootstrap-modal.js"></script>
Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
A rendered modal with header, body, and set of actions in the footer.
One fine body…
<div class="modal hide fade"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3>Modal header</h3> </div> <div class="modal-body"> <p>One fine body…</p> </div> <div class="modal-footer"> <a href="#" class="btn">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div>
$('#myModal').modal(options)
Options | Type | Default | Description |
---|---|---|---|
backdrop | boolean | 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 | If a remote url is provided, content will be loaded via jQuery's load method and injected into the .modal-body . If you're using the data api, you may alternatively use the href tag to specify the remote source. |
width | number | null | Set the inital width of the modal. |
height | number | null | Set the inital height of the modal. |
maxHeight | number | null | Set the max-height of the modal-body. |
loading | boolean | false | Toggle the loading state. |
spinner | string | html | Provide a custom image or animation for the loading spinner. |
consumeTab | boolean | true | Used to enable tabindexing for modals with data-tabindex . |
focusOn | boolean | true | The element or selector to set the focus to once the modal is shown data-focus-on . |
attentionAnimation | string | shake | Set the animation used by the attention method. Any animation in animate.css is supported but only the shake animation is included by default. |
modalOverflow | boolean | false | Set this property to true for modals with highly dynamic content. This will force the modal to behave as if it is larger than the viewport. |
manager | string | GlobalModalManager | Set the modal's manager. By default this is set to the GlobalModalManager and will most likely not need to be overridden. |
Options | Type | Default | Description |
---|---|---|---|
loading | boolean | false | Toggle the loading state. |
backdropLimit | number | null | Limit the amount of backdrops that will appear on the page at the same time. |
spinner | string | html | Provide a custom image or animation for the loading spinner. |
see also bootstrap-modal documentation
<script src="assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
$('.datepickers').datepicker(options)
<!-- Attached to a field with the format specified via options --> <input type="text" value="02-16-2012" id="datepicker"> <script type="text/javascript"> $('#datepicker').datepicker({ format: 'mm-dd-yyyy' }); </script>
<!-- Attached to a field with the format specified via data tag --> <input type="text" value="02/16/12" data-date-format="mm/dd/yy" id="datepicker"> <script type="text/javascript"> $('#datepicker').datepicker(); </script>
Options | Type | Default | Description |
---|---|---|---|
format | String | mm/dd/yyyy | The date format, combination of d, dd, m, mm, M, MM, yy, yyyy. |
weekStart | Integer | 0 | Day of the week start. 0 (Sunday) to 6 (Saturday) |
startDate | Date | Beginning of time | The earliest date that may be selected; all earlier dates will be disabled. |
endDate | Date | End of time | The latest date that may be selected; all later dates will be disabled. |
autoclose | Boolean | false | Whether or not to close the datepicker immediately when a date is selected. |
startView | Number, String | 0, month | The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers. |
todayBtn | Boolean, "linked" | false | If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. |
todayHighlight | Boolean | false | If true, highlights the current date. |
keyboardNavigation | Boolean | true | Whether or not to allow date navigation by arrow keys. |
language | String | en | The two-letter code of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). Currently ships with English ('en'), German ('de'), Brazilian ('br'), and Spanish ('es') translations, but others can be added (see I18N below). If an unknown language code is given, English will be used. |
forceParse | Boolean | true | Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given format . |
<script src="assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
$('.datetimepickers').datetimepicker(options)
<div id="datetimepicker" class="input-append date"> <input data-format="dd/MM/yyyy hh:mm:ss" type="text"> <span class="add-on"> <i data-time-icon="fontello-icon-clock" data-date-icon="fontello-icon-calendar"> </i> </span> </div> <script type="text/javascript"> $(function() { $('#datetimepicker').datetimepicker({ language: 'pt-BR' }); }); </script>
<script src="assets/plugins/bootstrap-daterangepicker/js/date.js"></script> <script src="assets/plugins/bootstrap-daterangepicker/js/bootstrap-daterangepicker.js"></script>
$('.daterangepicker').daterangepicker() $('input[name="daterange"]').daterangepicker();
<form class="form-horizontal"> <fieldset> <div class="control-group"> <label class="control-label" for="reservation">Reservation dates:</label> <div class="controls"> <div class="input-prepend"> <span class="add-on"><i class="icon-calendar"></i></span> <input type="text" name="reservation" id="reservation" /> </div> </div> </div> </fieldset> </form> <script type="text/javascript"> $(document).ready(function() { $('#reservation').daterangepicker(); }); </script>
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc"> <i class="icon-calendar icon-large"></i> <span></span> <b class="caret" style="margin-top: 8px"></b> </div> <script type="text/javascript"> $(document).ready(function() { $('#reportrange').daterangepicker({ ranges: { 'Today': ['today', 'today'], 'Yesterday': ['yesterday', 'yesterday'], 'Last 7 Days': [Date.today().add({ days: -6 }), 'today'], 'Last 30 Days': [Date.today().add({ days: -29 }), 'today'], 'This Month': [Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth()], 'Last Month': [Date.today().moveToFirstDayOfMonth().add({ months: -1 }), Date.today().moveToFirstDayOfMonth().add({ days: -1 })] }, opens: 'left', format: 'MM/dd/yyyy', separator: ' to ', startDate: Date.today().add({ days: -29 }), endDate: Date.today(), minDate: '01/01/2012', maxDate: '12/31/2013', locale: { applyLabel: 'Submit', fromLabel: 'From', toLabel: 'To', customRangeLabel: 'Custom Range', daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], firstDay: 1 }, showWeekNumbers: true, buttonClasses: ['btn-danger'] }, function(start, end) { $('#reportrange span').html(start.toString('MMMM d, yyyy') + ' - ' + end.toString('MMMM d, yyyy')); } ); //Set the initial state of the picker label $('#reportrange span').html(Date.today().add({ days: -29 }).toString('MMMM d, yyyy') + ' - ' + Date.today().toString('MMMM d, yyyy')); }); </script>
<script src="assets/plugins/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
$('.timepicker').timepicker();
<!-- Use as component --> <div class="input-append"> <input type="text" class="timepicker input-small"> <span class="add-on"> <i class="icon-time"></i> </span> </div>
Options | Type | Default | Description |
---|---|---|---|
template | String | dropdown (default), modal, false | Show picker in a dropdown. Show picker in a modal. Don't show a widget |
minuteStep | integer | 15 | Specify a step for the minute field. |
showSeconds | boolean | false | Show the seconds field. |
secondStep | integer | 15 | Specify a step for the second field. |
defaultTime | string | current (default), value, false | Set to the current time. Set to inputs current value. Do not set a default time |
showMeridian | boolean | true (default), false | 12hr mode 24hr mode |
showInputs | boolean | true (default), false | Shows the text inputs in the widget. Hide the text inputs in the widget |
disableFocus | boolean | false | Disables the input from focusing. This is useful for touch screen devices that display a keyboard on input focus. |
modalBackdrop | boolean | false | Show modal backdrop. |
<script src="assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
$('.colorpicker').colorpicker();
<!-- Use as component --> <div class="input-append color colorpicker" data-color="rgb(255, 146, 180)" data-color-format="rgb"> <input type="text" class="span2" value=""> <span class="add-on"> <i style="background-color: rgb(255, 146, 180)"></i> </span> </div>
Options | Type | Default | Description |
---|---|---|---|
format | string | hex | the color format - hex | rgb | rgba. |
<script src="assets/plugins/bootstrap-fileupload/js/bootstrap-fileupload.js"></script>
<div class="fileupload fileupload-new" data-provides="fileupload"> <div class="input-append"> <div class="uneditable-input span3"> <i class="icon-file fileupload-exists"></i> <span class="fileupload-preview"></span> </div> <span class="btn btn-file"><span class="fileupload-new">Select file</span> <span class="fileupload-exists">Change</span><input type="file" /></span> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a> </div> </div>
<div class="fileupload fileupload-new" data-provides="fileupload"> <span class="btn btn-file"> <span class="fileupload-new">Select file</span> <span class="fileupload-exists">Change</span> <input type="file" /> </span> <span class="fileupload-preview"></span> <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a> </div>
When uploading an image, it's possible to show a thumbnail instead of the filename.
<div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;"></div> <div> <span class="btn btn-file"> <span class="fileupload-new">Select image</span> <span class="fileupload-exists">Change</span> <input type="file" /> </span> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a> </div> </div>
<div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-new thumbnail" style="width: 200px; height: 150px;"> <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;"></div> <div> <span class="btn btn-file"> <span class="fileupload-new">Select image</span> <span class="fileupload-exists">Change</span> <input type="file" /> </span> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a> </div> </div>
<div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-new thumbnail" style="width: 50px; height: 50px;"> <img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="width: 50px; height: 50px;"></div> <span class="btn btn-file"> <span class="fileupload-new">Select image</span> <span class="fileupload-exists">Change</span> <input type="file" /> </span> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a> </div>
Via data attributes
Add data attributes to register the file upload widget. The main container should either have the .fileupload-new
class for a new record or if the record does not have file or .fileupload-exists
if an existing file is present. Elements inside the container with the .fileupload-new
and .fileupload-exists
class will be shown or hidden based on the current state. The content of .fileupload-preview
is replaced when a file is selected. Implement a button to clear the file with data-dismiss="fileupload"
. The content of .fileupload-preview
is replaced when a file is selected. Implement a button to clear the file with data-dismiss="fileupload"
.
$('.fileupload').fileupload()
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
.
Name | type | description |
---|---|---|
uploadtype | string | Choose 'file' or 'image'. If omitted, the type is automatically determined based on the presence of a .thumbnail element. |
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. |
<script src="assets/plugins/bootstrap-rowlink/js/bootstrap-rowlink.js"></script>
$('tbody.rowlink').rowlink()
Name | Description | Actions |
---|---|---|
Feature | Lorem ipsum dolor sit amet consectetuer tellus Nullam Cum enim a | Action |
Table | Lorem ipsum dolor sit amet consectetuer tellus Nullam Cum enim a | Action |
<table class="table table-bordered table-condensed table-striped" data-provides="rowlink"> <tr> <td><a href="boo.html#feature">Feature</a></td> <td class="nohref"><a href="#">Action</a></td> </tr> <tr> <td><a href="base-css.html#tables">Table</a></td> <td class="nohref"><a href="#">Action</a></td> </tr> </table>
Add data-provides="rowlink"
to a <table>
, <tbody>
or <tr>
element. The value should be selector to the link, which is a child of the row. A cell can be excluded by adding the .nolink
class to the <td>
.
Tip! Add .rowlink
to your <a>
. This prevents the link styling during page load.
Name | type | default | description |
---|---|---|---|
target | string | 'a' | A jquery selector string, to select the link element within each row. |
<script src="assets/plugins/bootstrap-progressbar/js/bootstrap-progressbar.js"></script>
$('.progress .bar').progressbar();
set the data attribute and remove the width style attribute (alternatively you can set it to 0)
<!-- data-percentage --> <div class="progress progress-info"> <div class="bar" data-percentage="75"></div> </div>
<!-- data-amount-part and data-amount-total --> <div class="progress progress-info"> <div class="bar" data-amount-part="1337" data-amount-total="9000"></div> </div>
to use a horizontal progressbar which is align to the right you have to add right
to the progress
element
<div class="progress right progress-info">
to use a vertical progressbar you have to add vertical
to the progress
element
<div class=progress vertical progress-info">
o use a vertical progressbar which is align to the bottom you have to add vertical
and bottom
to the progress
element
<div class="progress vertical bottom progress-info">
simply add additional parameters when activating the script
$(document).ready(function() { $('.progress .bar').progressbar({ transition_delay: 300, refresh_speed: 50, display_text: 2, use_percentage: true, update: doSomethingCool( current_percentage ) { .. }, done: doSomethingCool( ) { .. }, fail: doSomethingCool( error_message ) { .. }, }); });
Options | Description | |
---|---|---|
transition_delay | is the time in milliseconds until the animation starts | |
refresh_speed | is the time in milliseconds which will elapse between every text refresh / callback call | |
display_text | determines whether the text will be displayed | |
0 | no text this mode doesn't change any css / html | |
1 | text on filled bar this mode doesn't change any css / html | |
2 | text on center this mode changes css / html due to styling requirements | |
use_percentage | determines whether the text will be displayed in percent or amount | |
update | callback where you can grab the actual percentage value | |
done | callback which indicates when progressbar is filled to the given value | |
fail | callback where you can grab an error message when something went wrong |
horizontal
.progress .bar.two-sec-ease-in-out { -webkit-transition: width 2s ease-in-out; -moz-transition: width 2s ease-in-out; -ms-transition: width 2s ease-in-out; -o-transition: width 2s ease-in-out; transition: width 2s ease-in-out; }
vertical
.progress.vertical .bar.two-sec-ease-in-out { -webkit-transition: height 2s ease-in-out; -moz-transition: height 2s ease-in-out; -ms-transition: height 2s ease-in-out; -o-transition: height 2s ease-in-out; transition: height 2s ease-in-out; }
<div class="progress progress-success right"> <div data-amount-total="9000" data-amount-part="1337" class="bar six-sec-ease-in-out"></div> </div>
you have a choice of 2s two-sec-ease-in-out
or 4s four-sec-ease-in-out
or 6s six-sec-ease-in-out
or use custom css
<script src="assets/plugins/bootstrap-wysihtml5/lib/js/wysihtml5-0.3.0.min.js"></script> <script src="assets/plugins/bootstrap-wysihtml5/src/bootstrap-wysihtml5.js"></script>
$('#some-textarea').wysihtml5();
<textarea id="some-textarea" placeholder="Enter text ..."></textarea>
<script src="assets/plugins/bootstrap-select/bootstrap-select.js"></script>
$('.selectpicker').selectpicker();
<select class="selectpicker"> <option>Mustard</option> <option>Ketchup</option> <option>Barbecue</option> </select>
Control size to wrap .selectpicker-block
<select id="selectpicker2" class="span3" data-style="btn-green"> <option value="1">item 1</option> <option value="2">item 2</option> <option value="3">item 3</option> </select>
Key | Default | Description |
---|---|---|
style | btn | class for bootstrap button btn-success use via class data-style to the select |
size | 'auto' | When size is set to 'auto' , the menu always opens up to show as many items as the window will allow without being cut off. Set size to 'false' to always show all items. Use via class data-size to the select |
$('.selectpicker').selectpicker(); $('select').selectpicker(); $('.selectpicker').selectpicker({ style: 'btn-info', size: 3 });
Apply .span*
class to the selects to set the width. Add the disabled
attribute to the select to apply the .disabled
class.
<script src="assets/plugins/bootstrap-multiselect/js/bootstrap-multiselect.js"></script>
$('#multiselect').multiselect();
<select id="multiselect"> <option value="item1">item 1</option> <option value="item2">item 2</option> <option value="item3">item 3</option> <option value="item4">item 4</option> <option value="item5">item 5</option> <option value="item6">item 6</option> </select>
Key | Default | Description |
---|---|---|
none | define placeholder if no selection | |
width | auto | The width of the dropdown button px % auto |
text | Defining the text of the button. Must be a function returning a string. All currently selected options are passed as parameter. | |
container | <span class="dropdown" /> | The used container holding both the dropdown button and the dropdown menu. |
onchange | Assign an event handler to the change event: |
$(document).ready(function() { $('.multiselect').multiselect() $('.multiselect').multiselect({ 'none': 'select something...' }); $('.multiselect').multiselect({ container: '<span class="dropdown" />', }); });
<script src="assets/plugins/bootstrap-fuelux/js/combobox.js.js"></script>
$('#myCombobox').combobox()
<div class="input-append dropdown combobox"> <input class="span3" type="text"> <button class="btn" data-toggle="dropdown"><i class="caret"></i></button> <ul class="dropdown-menu"> <li><a href="#">Item One</a></li> <li><a href="#">Item Two</a></li> <li><a href="#">Item Three</a></li> <li class="divider"></li> <li><a href="#">Item After Divider</a></li> </ul> </div>
Method | Description |
---|---|
disable | Disable the combobox |
enable | Enable the combobox |
selectedItem | Returns an object containing the jQuery data() contents of the selected item which includes data-* attributes plus a text property with the items's visible text.
|
setByIndex | Set the selected item based on its index in the list (zero-based index). Convenience method for
setBySelector('li:eq({index})') |
setByText | Set the selected item based on its text value |
setBySelector | Set the selected item based on a selector. For example: $('#myCombobox').select('setBySelector','li[data-fizz=buzz]');
|
setByValue | Set the selected item based on its value. Convenience method for setBySelector('data-value={value}')
that requires the item to have a data-value="{value}" attribute
|
Event | Description |
---|---|
changed | This event is fired when the value has changed (either by selecting an item from the list or
updating the input value directly). Arguments are event, data where data represents
the same object structure returned by the selectedItem method.
|
<script src="assets/plugins/bootstrap-fuelux/js/spinner.js"></script>
$('#MySpinner').spinner()
<div id="MySpinner" class="spinner"> <input type="text" class="input-mini spinner-input"> <div class="spinner-buttons btn-group btn-group-vertical"> <button class="btn spinner-up"> <i class="fontello-icon-up-micro"></i> </button> <button class="btn spinner-down"> <i class="fontello-icon-down-micro"></i> </button> </div> </div>
Method | Description |
---|---|
value | Sets or returns the spinner value. As an example, $('#MySpinner').spinner('value')
would return spinner value and $('#MySpinner').spinner('value',
37) would set spinner value to 37.
|
disable | Disable the spinner. |
enable | Enable the spinner. |
Options | Description | Default Value |
---|---|---|
value | Sets the initial spinner value. | 1 |
min | Sets the minimum spinner value. | 1 |
max | Sets the maximum spinner value. | 999 |
step | Sets the increment by which the value in the spinner will change each time the spinner buttons are pressed. | 1 |
hold | If true the spinner will react to its buttons being pressed and held down. |
true |
speed | Spinner speed when buttons are held down. The options include:
"fast","medium","slow" .
|
"medium" |
disabled | Spinner will be disabled when it is created. | false |
Event | Description |
---|---|
changed | This event is fired when the value has changed (either by selecting an item from the list or
updating the input value directly). Arguments are event, value where value is
the current value of the spinner.
|
<script src="assets/plugins/bootstrap-fuelux/js/search.js"></script>
$('#MySearch').search()
<div id="MySearch" class="input-append search"> <input type="text" class="input-medium" placeholder="Search"><button class="btn"><i class="fontello-icon-search-5"></i></button> </div>
Method | Description |
---|---|
disable | Disables the search control |
enable | Enables the search control |
Event | Description |
---|---|
searched | This event is fired when a search has been performed. Arguments are event,
searchText |
cleared | This event is fired when the search has been cleared. |
<script src="assets/plugins/bootstrap-wizard/js/bootstrap-wizard.js"></script>
$('#wizard').bootstrapWizard();
<!-- Base --> <div id="wizard"> <div class="navbar"> <div class="navbar-inner"> <div class="container"> <ul> <li><a href="#tab1" data-toggle="tab">First</a></li> <li><a href="#tab2" data-toggle="tab">Second</a></li> <li><a href="#tab3" data-toggle="tab">Third</a></li> </ul> </div> </div> <div class="tab-content"> <div class="tab-pane" id="tab1"> 1 </div> <div class="tab-pane" id="tab2"> 2 </div> <div class="tab-pane" id="tab3"> 3 </div> </div> <ul class="pager wizard"> <li class="previous first" style="display:none;"><a href="#">First</a></li> <li class="previous"><a href="#">Previous</a></li> <li class="next last" style="display:none;"><a href="#">Last</a></li> <li class="next"><a href="#">Next</a></li> </ul> </div> </div>
Key | Default | Description |
---|---|---|
class | nav nav-pills | ul navigation class |
nextSelector | .wizard li.next | next element selector |
previousSelector | .wizard li.previous | previous element selector |
firstSelector | .wizard li.first | first element selector |
lastSelector | .wizard li.last | last element selector |
onInit | null | Fired when plugin is initialized |
onShow | null | Fired when plugin data is shown |
onNext | null | Fired when next button is clicked (return false to disable moving to the next step) |
onPrevious | null | Fired when previous button is clicked (return false to disable moving to the previous step) |
onFirst | null | Fired when first button is clicked (return false to disable moving to the first step) |
onLast | null | Fired when last button is clicked (return false to disable moving to the last step) |
onTabClick | null | Fired when a tab is clicked (return false to disable moving to that tab and showing it's contents) |
onTabShow | null | Fired when a tab content is shown (return false to disable showing that tab content) |
<script src="assets/plugins/bootstrap-wizard-2/js/bwizard-only.min.js"></script>
$("#wizard").bwizard();
For detailed info visit the original documentation
<script src="assets/plugins/bootstrap-fuelux/js/pillbox.js"></script>
$('#MyPillbox').pillbox()
<div id="MyPillbox" class="pillbox"> <ul> <li data-value="foo">Item One</li> <li class="status-success">Item Two</li> <li class="status-warning">Item Three</li> <li class="status-important">Item Four</li> <li class="status-info">Item Five</li> <li class="status-success">Item Six</li> <li>Item Seven</li> </ul> </div>
Method | Description |
---|---|
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
|
Location of assets/plugins/
<script src="assets/plugins/datatables/media/js/jquery.dataTables.js"></script> <script src="assets/plugins/datatables/plugin/jquery.dataTables.plugins.js"></script> <script src="assets/plugins/datatables/plugin/jquery.dataTables.columnFilter.js"></script>
$('#table').datatable();
//* http://datatables.net/blog/Twitter_Bootstrap_2 $.extend($.fn.dataTableExt.oStdClasses, { sWrapper: "datatable-wrapper form-inline", sFilter: "table-global-filter pull-right", sInfo: "table-message-info", sPaging: "btn-group paging_", sLength: "length pull-left", //sProcessing: "", // Paging two button sPagePrevEnabled: "btn previous", sPagePrevDisabled: "btn previous disabled", sPageNextEnabled: "btn next", sPageNextDisabled: "btn next disabled", // Paginate full numbers sPageButton: "btn btn-boo", sPageButtonActive: "btn btn-sky active", sPageButtonStaticDisabled: "btn disabled", sPageFirst: "btn", sPageLast: "btn", sPageNext: "btn", sPageLast: "btn" });
ID | Name | City | Date of birth | |
---|---|---|---|---|
1 | Colin Nixon | Long Beach | semper@diamSeddiam.edu | 02/10/1986 |
2 | Naida Bennett | Lockport | commodo@Curabiturconsequatlectus.ca | 04/21/1959 |
3 | Danielle Myers | Bentonville | nunc.sed@liberoInteger.ca | 12/11/1971 |
4 | Whitney Jones | Troy | Nunc@sedliberoProin.edu | 08/09/1976 |
5 | Marvin Bell | Cody | aliquet@Craspellentesque.com | 10/17/1979 |
6 | Lucas Melendez | Plano | Maecenas.malesuada@Duismi.org | 02/25/1967 |
7 | Devin Harris | Altoona | dolor.sit@apurus.org | 01/09/1990 |
8 | Tucker Graves | Yorba Linda | libero.nec.ligula@hendrerita.ca | 12/03/1962 |
9 | Linus Carpenter | Attleboro | pellentesque.massa@feugiat.com | 03/06/1975 |
<table id="exampleDT" class="table table-striped table-hover"> <caption>Default Table Caption - Title for table <span>Here text in span</span></caption> <thead> <tr> <th scope="col">ID <span class="column-sorter"></span></th> <th scope="col">Name <span class="column-sorter"></span></th> <th scope="col">City <span class="column-sorter"></span></th> <th scope="col">Email <span class="column-sorter"></span></th> <th scope="col">Date of birth <span class="column-sorter"></span></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Colin Nixon</td> <td>Long Beach</td> <td>semper@diamSeddiam.edu</td> <td>02/10/1986</td> </tr> <tr> ... </tr> </tbody> </table> $('#exampleDT').dataTable({ iDisplayLength: 3, sDom: "<'row-fluid' <'span4'l> <'span8'pf> > rt <'row-fluid' <'span12'i> >" });Refer to the sample code in detail page for more settings
and demo file ../assets/js/demo/demo-jquery.dataTables.js
<script src="assets/plugins/sparkline/jquery.sparkline.js"></script>
<script src="assets/plugins/flot/jquery.flot.js"></script> plugins for Flot <script src="assets/plugins/flot/jquery.flot.categories.js"></script> <script src="assets/plugins/flot/jquery.flot.grow.js"></script> <script src="assets/plugins/flot/jquery.flot.orderBars.js"></script> <script src="assets/plugins/flot/jquery.flot.pie.js"></script> <script src="assets/plugins/flot/jquery.flot.resize.js"></script> <script src="assets/plugins/flot/jquery.flot.selection.js"></script> <script src="assets/plugins/flot/jquery.flot.stack.js"></script> <script src="assets/plugins/flot/jquery.flot.stackpercent.js"></script> <script src="assets/plugins/flot/jquery.flot.time.js"></script>
<script src="assets/plugins/uniform/jquery.uniform.js"></script>
$("input.checkbox, input.radio, input:file.input-file").uniform({ radioClass: 'radios' // edited class - the original radio });
Use class .checkbox
.radio
to element
<label class="checkbox"> <input class="checkbox" type="checkbox" value="option1"> Lorem ipsum dolor sit amet, consectetur adipiscing checkbox </label> <label class="checkbox"> <input class="checkbox" type="checkbox" value="option2" checked> Lorem ipsum dolor sit amet, consectetur adipiscing checkbox </label> <label class="radio"> <input class="radio" type="radio" value="option1"> Lorem ipsum dolor sit amet, consectetur adipiscing Radio </label>
Options | Type | Default | Description |
---|---|---|---|
selectClass | string | selector | Sets the class given to the wrapper div for select elements. |
radioClass | string | radio | Sets the class given to the wrapper div for radio elements. |
checkboxClass | string | checker | Sets the class given to the wrapper div for checkbox elements. |
fileClass | string | uploader | Sets the class given to the wrapper div for file upload elements. |
filenameClass | string | filename | Sets the class given to div inside a file upload container that spits out the filename. |
fileBtnClass | string | action | Sets the class given to div inside a file upload container that acts as the "Choose file" button. |
fileDefaultText | string | No file selected | Sets the text written in the filename div of a file upload input when there is no file selected. |
fileBtnText | string | Choose File | Sets the text written on the action button inside a file upload input. |
checkedClass | string | checked | Sets the class given to elements when they are checked (radios and checkboxes). |
focusClass | string | focus | Sets the class given to elements when they are focused. |
disabledClass | string | disabled | Sets the class given to elements when they are disabled. |
activeClass | string | active | Sets the class given to elements when they are active (pressed). |
hoverClass | string | hover | Sets the class given to elements when they are currently hovered. |
useID | boolean | true | If true, sets an ID on the container div of each form element. The ID is a prefixed version of the same ID of the form element. |
idPrefix | string | uniform | If useID is set to true, this string is prefixed to element ID's and attached to the container div of each uniformed element. If you have a checkbox with the ID of "remember-me" the container div would have the ID "uniform-remember-me". |
resetSelector | boolean, string | false | This parameter allows you to use a jQuery-style selector to point to a "reset" button in your form if you have one. Use false if you have no "reset" button, or a selector string that points to the reset button if you have one. |
Sprite PSD for uniform located in the directory source/PSD
<script src="assets/plugins/select2/select2.min.js"></script>
$("#selecttwo").select2();
<select class="selecttwo"> <option value="1">item 1</option> <option value="2">item 2</option> <option value="3">item 3</option> </select> // control size <select class="selecttwo-s span3"> <option value="1">item 1</option> <option value="2">item 2</option> <option value="3">item 3</option> </select> $(".selecttwo").select2({ minimumResultsForSearch: 6 }); $(".selecttwo").select2();
<select class="selecttwo span3" multiple="multiple"> <option value="1">item 1</option> <option value="2">item 2</option> <option value="3">item 3</option> ... </select> $(".selecttwo").select2();
<input id="select-tag" class="span4" type="hidden" value="brown,red"> $("#select-tag").select2({ tags:["brown", "red", "green", "blue"] });
Sprite PSD for select2 located in the directory source/PSD
Select2 plugin offers great possibilities to setup and use. Use the original documentation for details
div
with an id
of the name of the input area you are counting with a "_counter" suffix. For example, if the input
you want to count is called "countMe", the id
of the div
that keeps track of the count will be "countMe_counter".<script src="assets/plugins/counter/jquery.counter.js"></script>
$(".limiteChar").counter(); $(".limiteChar15").counter({ goal: 15 }); $(".limiteChar140").counter({ goal: 140 });
<div class="control-group"> <label for="limiteChar" class="control-label">Limited characters:</label> <div class="controls"> <input id="limiteChar" class="span4 limiteChar15" type="text"> </div> </div> $(".limiteChar15").counter({ goal: 15 });
<label class="checkbox"> <div class="control-group"> <label for="limiteWords" class="control-label">Limited words:</label> <div class="controls"> <textarea id="limiteWords" rows="3" class="span4 limiteWords15"></textarea> </div> </div> $(".limiteWords15").counter({ goal: 15, type: 'word', msg: 'words left before you fall into a pit of emptiness.' });
Options | Type | Value | Description |
---|---|---|---|
type | string | char, word | Count characters or words by using char or word respectively. |
count | string | down, up | Count up or down to or from your goal |
goal | string | 140, x, sky | The goal number. If you are counting down , the counter will start on this number. If however you are counting up, the counter will end on this number.Sky's the limit! Setting the goal to the string sky enables counting up, infinitely without stopping the user. |
text | boolean | true, false | Set false if you only want the numbers to show and not the words ( msg ). |
msg | string | x character(s)/word(s) left x character(s)/word(s) (y max) Your message here! Custom language translation |
There are various defaults set based on the type, count options being used. You can set your own message to be added after the input field using this plugin. If you want the message off, just set the text to false. Optionally, you can use the translation option to translate the default language of the message that is shown after the input field. |
<script src="assets/plugins/elastic/jquery.elastic.js"></script>
$('textarea.auto').elastic(); $('textarea.auto').trigger('update');
<textarea placeholder="paste long text" class="span4 auto" rows="3" id="elasticTextarea"></textarea>
<script src="assets/plugins/inputmask/jquery.inputmask.js"></script> <script src="assets/plugins/inputmask/jquery.inputmask.extensions.js"></script>
$("#date").inputmask("d/m/y"); //direct mask $("#phone").inputmask("mask", {"mask": "(999) 999-9999"}); //specifying fn & options $("#tin").inputmask({"mask": "99-9999999"}); //specifying options only
$("#date").inputmask("d/m/y",{ "placeholder": "*" });
$("#date").inputmask("d/m/y",{ "placeholder": "dd/mm/yyyy" });
<input id="phone" type="text" />
<script src="assets/plugins/validate/js/jquery.validate.min.js"></script>
<script src="assets/plugins/nicescroll/jquery.nicescroll.min.js"></script>
$("html").niceScroll(); var nice = $("#mydiv").getNiceScroll();
Options | Default | Description |
---|---|---|
cursorcolor | #000000 | change cursor color in hex |
cursoropacitymin | 0 (hidden) | change opacity very cursor is inactive (scrollabar "hidden" state), range from 1 to 0 |
cursoropacitymax | 1 (full opacity) | change opacity very cursor is active (scrollabar "visible" state), range from 1 to 0 |
cursorwidth | 5 (you can write "5px" too) | cursor width in pixel |
cursorborder | 1px solid #fff | css definition for cursor border |
cursorborderradius | 4px | border radius in pixel for cursor |
zindex | 9999 | change z-index for scrollbar div |
scrollspeed | 60 | scrolling speed |
mousescrollstep | 40 (pixel) | scrolling speed with mouse wheel |
touchbehavior | false | enable cursor-drag scrolling like touch devices in desktop computer |
hwacceleration | true | use hardware accelerated scroll when supported |
boxzoom | false | enable zoom for box content |
dblclickzoom | true | (only when boxzoom=true) zoom activated when double click on box |
gesturezoom | true | (only when boxzoom=true and with touch devices) zoom activated when pitch out/in on box |
grabcursorenabled | true | display "grab" icon for div with touchbehavior = true |
autohidemode | true | how hide the scrollbar works, true=default / "cursor" = only cursor hidden / false = do not hide |
background | "" | change css for rail background |
iframeautoresize | true | autoresize iframe on load event |
cursorminheight | 20 | set the minimum cursor height in pixel |
preservenativescrolling | true | you can scroll native scrollable areas with mouse, bubbling mouse wheel event |
railoffset | false | you can add offset top/left for rail position |
bouncescroll | false | enable scroll bouncing at the end of content as mobile-like (only hw accell) |
spacebarenabled | true | enable page down scrolling when space bar has pressed |
railpadding | {top:0,right:0,left:0,bottom:0} | set padding for rail bar |
disableoutline | true | for chrome browser, disable outline (orange hightlight) when selecting a div with nicescroll |
$("html").niceScroll({ cursoropacitymin:0.1, cursoropacitymax:0.9, cursorcolor:"#adafb5", cursorwidth:"8px", cursorborder:"", cursorborderradius:"8px", usetransition:600, background:"", railoffset:{top:10,left:-3} }); $("#main-sidebar").niceScroll({ cursoropacitymin:0.1, cursoropacitymax:0.9, cursorcolor:"#adafb5", cursorwidth:"6px", cursorborder:"", cursorborderradius:"6px", usetransition:600, background:"", railoffset:{top:10,left:-1} });
<script src="assets/plugins/qtip2/dist/jquery.qtip.min.js"></script>
class | position | sample |
---|---|---|
.tip-tl |
top left | |
.tip-tc |
top center | |
.tip-tr |
top right | |
.tip-bl |
bottom left | |
.tip-bc |
bottom center | |
.tip-br |
bottom right | |
.tip-rt |
right top | |
.tip-rc |
right center | |
.tip-rb |
right bottom | |
.tip-lt |
left top | |
.tip-lc |
left center | |
.tip-lb |
left bottom |
<a href="#" class="tip-tc" title="sample gTip2">hover to sample</a>
<script src="assets/plugins/list/js/list.min.js"></script> <script src="assets/plugins/list/plugins/list.paging.min.js"></script>
Plugin List.js Boo is used for example in ToDo Remember Remember or Last logged user
<div id="remember"> <ul class="list"> <li> <h3 class="name">Jonny</h3> <p class="city">Stockholm</p> </li> <li> <h3 class="name">Jonas</h3> <p class="city">Berlin</p> </li> </ul> </div> var options = { valueNames: [ 'name', 'city' ] }; var rememberList = new List('remember', options);
<script src="assets/plugins/fullcalendar/fullcalendar.js"></script>
$('#calendar').fullCalendar();
// example - more in component-fullcalendar.html <div id="calendar" class="widget widget-simple header-black fc-striped"> </div>
explore assets/js/demo/demo-fullcalendar.js
$('#calendar').fullCalendar({ header: { left: 'title,today', center: '', right: 'prev,month,agendaWeek,agendaDay,next' }, buttonText: { prev: '<i class="fontello-icon-left-open-1"></i>', next: '<i class="fontello-icon-right-open-1"></i>', prevYear: ' << ', nextYear: ' >> ', today: ' today <i class="fontello-icon-target-2 f-14"></i>' }, aspectRatio: 2, editable: true, ... ... ... });
<script src="assets/plugins/google-code-prettify/prettify.js"></script>
For detailed information about the bootstrap javascript framework to go bootstrap documentation