backbone-features

Unsorted set of backbone-based code


Install
bower install backbone-features#v0.1.0

Documentation

Here are few useless code snippets.

JS namespaces

module = define 'app.ui'
class module.TipTop
  constructor: ->

new module.TipTop
new app.ui.TipTop

Backbone.View-based Feature class

class ui.Tooltip extends lib.Feature
  # define ui object
  ui:
    close: '.tooltip-close' # @ui.$close is a jquery-object

Start feature

class ui.Tooltip extends lib.Feature
  el: '.tooltip'

ui.Tooltip.serve() # Initializes Tooltips for all .tooltip in document on document-ready event.

Installation

Install using bower: bower install --save backbone-features.
It requires jquery, underscore and backbone.