Skip to content

Instantly share code, notes, and snippets.

@droot
Created April 6, 2011 16:24
Show Gist options
  • Save droot/905969 to your computer and use it in GitHub Desktop.
Save droot/905969 to your computer and use it in GitHub Desktop.
Configuration Input View Implementation
class ConfigInputView extends Backbone.View
initialize: ->
@model.view = @
events:
'keyup #color-input': "updateConfig"
'keyup #width-input': "updateConfig"
updateConfig: (e)=>
@model.set 'color': $('#color-input').val() , 'width': $('#width-input').val(), 'height': $('#width-input').val()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment