Skip to content

Instantly share code, notes, and snippets.

@droot
Created April 6, 2011 16:25
Show Gist options
  • Save droot/905972 to your computer and use it in GitHub Desktop.
Save droot/905972 to your computer and use it in GitHub Desktop.
ColorBox View implementation
class ColorBoxView extends Backbone.View
tagName: 'li'
initialize: ->
@template = $('#color-box-template').template()
@model.bind 'change', @render
@model.view = @
render: =>
$(@el).html $.tmpl @template, @model.toJSON()
return @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment