I am on way to learning backbonejs. I am working with the popular todo list tutorial.
I have certain questions about which i am a bit confused:
In one the models i found this function:
toggle: function() { this.save({completed: !this.get(’completed’)});}
The thing that i don't understand is this.save function. How does it work? What does it actually saves and where. And what does the code inside this function means:
completed: !this.get
and so on.In one of the views i found this line of code:
this.input = this.$(’#new-todo’);
Now what does
this.input
means? And i also don't understand the sytnaxthis.$('#new-todo');
Let me know if more code is needed for comprehension. Also if anyone could point me to great learning resources for backbone, it will be awesome. Currently i am learning from 'Backbone Fundamentals' by addyosmani.