0
어떻게 todo.js에 추가 필드를 추가합니까?todo.js에 추가 필드 추가
initialize: function() {
this.input = this.$("#new-todo");
Todos.bind('add', this.addOne, this);
Todos.bind('reset', this.addAll, this);
Todos.bind('all', this.render, this);
Todos.fetch();
},
위의 코드는 문제가 있다고 생각합니다. # new-todo는 텍스트 필드가있는 div id입니다.
'this.input'을 새 필드의 ID와 함께 추가하지만 가져 오지 않습니다. 추가 요소는 어떻게 추가합니까?
이 마음에 드십니까? this.inputto = $ ("another-todo") – user901790
아니요, 이렇게 :'this.anothertodo = $ ("# another-todo")'나는 당신을 올바르게 이해합니다. –
이것은 작동하지 않습니다. 어떻게 든 저는 전체 코드를 보낼 수 있습니다. – user901790