Single Select Multiple Select Hide Search on Single Select The disable_search_threshold option can be specified to hide the search input on single selects if there are n or fewer options. Default Text Support Chosen automatically sets the default field text ("Choose a country... ") by reading the select element's data-placeholder value. Note: on single selects, the first element is assumed to be selected by the browser.
The Sample Application You can run the application here. Twitter Bootstrap highlights Backbone.js highlights One-to-Many association. Extensions, Plugins, Resources · documentcloud/backbone Wiki. Dependencies Underscore.js Backbone's only hard dependency. JSON2.js Needed if you'd like to parse and serialize JSON in older browsers (read: "Internet Explorer") jQuery Recommended for DOM manipulation and Ajax. Lo-Dash A performance-minded Underscore alternative with customs builds and additional features. Zepto A jQuery alternative for mobile apps NB: Zepto isn't fully compatible with jQuery, use at your own risk Backbone.Native A tiny drop-in replacement for jQuery to allow Backbone to work while relying on only native DOM APIs. Exoskeleton A faster and leaner Backbone for your HTML5 apps. Backbone fork with 100% optional dependencies, speed improvements and other enhancements. Development Tools Backbone Eye A Firebug extension to debug Backbone based applications running off web-browsers.
Organizing Your Backbone.js Application With Modules – Organizing Your Backbone.js Application With Modules – Bocoup Web Log. If you have spent any time looking at Backbone.js, like many others, you are probably amazed by how lightweight, flexible and elegant it is. Backbone.js is incredibly powerful, but not prescriptive in how it should be used. With great power comes great responsibility, and if you’ve tried to use Backbone.js for a large project you might be asking yourself: how do I organize my code? When thinking about “code organization” the questions you might be asking are: How do I declare and invoke Backbone types?
It provides a clean way to surgically separate your data from your presentation. Overview of Backbone.JS Created by Jeremy Ashkenas, the JS ninja who built CoffeeScript, Backbone is a super light-weight library that lets you create easy to maintain front ends. Backbone is a collection of cohesive objects, weighing in at a shade under 4kb, that lend structure to your code and basically helps you build a proper MVC app in the browser. Let's face it: the above is a little hard to parse and make sense of. Key-value binding and custom events Rich API of enumerable functions Views with declarative event handling Your days of writing spaghetti bind calls are over. Backbone.js Tutorials.