You get an exception because you are calling _.bindAll on changeInputs . When you do this, you say that changeInputs will be bound to your object when it is called.
In other words, when you reference $(this) , you send an instance of CreatePollView to jQuery, which he doesn't like.
You want to keep this binding, though, since you are accessing your model ( this.model ), therefore this should be an instance of CreatePollView .
Instead, you can receive an event from your function and use target or other information:
changeInputs: function(e) { }
Brian genisio
source share