Lightweight Bootstrap-esque select element that doesn't require Bootstrap
Backbone Select is a fully customisable plugin for use in web applications. It is written in BackboneJS but can be used in any front end environment.
The latest version of Backbone Select is v0.0.1.
Backbone Tooltip requires:
Note: Backbone requires either Underscore or Lo-Dash so you will need to also include one of these manually if you are not installing with Bower.
Backbone Select can be installed using Bower
$ bower install backbone-selectYou can clone the GitHub repository
$ git clone https://github.com/joefitter/backbone-selectOr you can download the repo as a .zip here - extract and copy the src folder into your project.
You will need to include the stylesheet in the <head> of every page the select element will be used on:
<link rel="stylesheet" href="bower_components/backbone-select/src/backbone-select.css">If your project uses RequireJS, Backbone Select can be included as an AMD module by adding the AMD version to your paths config, you will also need to specify the locations of jQuery, Backbone and Underscore:
requirejs.config({
paths: {
select: 'bower_components/backbone-select/src/backbone-select.amd',
backbone: 'bower_components/backbone/backbone',
jquery: 'bower_components/jquery/dist/jquery',
underscore: 'bower_components/underscore/underscore'
...
}
});You can now use require to include the select whenever it is needed:
require(['select'], function(Select){
...
});
define('module-name', ['select', ...], function(Select, ...){
...
});For non-AMD projects, include the following scripts before the closing <head> tag
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/backbone/backbone.js"></script>
<script src="bower_components/backbone-select/src/backbone-select.js"></script>Alter the paths above so they point to the correct locations in your file structure.
If you use the non-AMD version, the select is instantiated by creating a new Backbone.Select();