I have a problem with binding a simple login form to a model. The autocomplete event will not be recognized by stickit, and therefore the view is not synchronized with the model.
html is pretty straight forward:
<form> <input id="username" type="text"/> <input id="password" type="password"/> </form>
The view will be initialized with an empty model and associated with the render function. Here is an excerpt from the code:
bindings: { '#username': 'username', '#password': 'password' }, ... initialize: function () { this.model = new Backbone.Model(); } ... render: function() { this.stickit(); }
If I get the value by calling $('username').val() in the initialize function, I get the correct autocomplete value.
Does anyone know a solution to this problem?
I did not create a problem in the git repository because I am not sure if I am doing something wrong and autocomplete works out of the box.
Thanks in advance!
back
source share