Bootstrap Tour, DOM Utils, asEvented

Alex R. Young





events dom backbone.js

Bootstrap Tour, DOM Utils, asEvented

Posted by Alex R. Young on .

events dom backbone.js

Bootstrap Tour, DOM Utils, asEvented

Posted by Alex R. Young on .

Bootstrap Tour

Bootstrap Tour (GitHub: pushly / bootstrap-tour, License: Apache 2.0) from Push.ly is a small library for building interactive product tours with Twitter Bootstrap. Tours are instances of Tour, and can contain a reference to an element to anchor to along with a title and descriptive text:

var tour = new Tour();

  element: 'selector'
, title: 'Popup Title'
, content: 'Descriptive text'

Steps will be displayed using popovers, and the tour can be ended at any time. Steps can also contain a path option so tours can span several pages.

DOM Utils

Utils (License: MIT) by Matt McDonald is a modular DOM library designed to degrade gracefully and work in a wide range of browsers. It contains a lot of the utility functions we find ourselves needing when working without a larger framework, for example:

  • Utils.is.arrayLike: Is a given object array-like?
  • Utils.node.prepend: An insertBefore wrapper method
  • Utils.select.byClassName: Returns an array of node-like objects that match the class name

Some methods will return null in browsers that don't support the underlying DOM API calls. This is documented thoroughly, with a suggestion on how to proceed:

Warning: this property will return null if the host environment is detected to be unsuitable; an if block or a similar construct should be used for detection.

Rather than falling over to less efficient methods, this library prefers to make the developer determine how to proceed.

Utils can be downloaded by selecting the required modules: Utils Download.


asEvented (License: MIT, npm: asEvented) by Michal Kuklis is a small event emitter module that works in Node and browsers. It works using a mixin style rather than through inheritance:

function Model() {  
  this.id = 0;


This gives Model methods for dealing with events, like trigger and bind.

The project has already received a few contributions, and it includes qunit tests that are easy to run in a browser.