maccman / spine.todos

A Backbone alternative idea

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing jQuery selector in javascript version

CaptainQuirk opened this issue · comments

The TaskApp::create() function should be like this :

create : function(e){
e.preventDefault();
console.log ( this ) ;
Task.create({name:this.$("input").val()});
this.$("input").val("");
} ,

rather than

create : function(e){
e.preventDefault();
console.log ( this ) ;
Task.create({name:this.input.val()});
this.input.val("");
} ,

where the jQuery selector is missing causing an error to be thrown when trying to access undefined "input" property of this

Nope, input is set by the 'elements' hash - ping me on irc about this.