Last Updated: February 25, 2016
· chriswoodford

Create Bootstrap Elements Programmatically with Backbone

I threw together a little library to make it easy to programmatically create the HTML elements required for Bootstrap's Javascript. It uses Backbone.js Views to lace it all together.

the source is up on github:
there's even a quick ruby gem for rails integration:

Here's an example of how to use it (written in CoffeeScript)

Instantiate the Modal with options

$(document).ready ->
  login = new YourApplication.Views.Login
    title: 'Login'
    noCloseButton: true
      show: false

Have a fresh tip? Share with Coderwall community!

Post a tip