examples/example-todo-formview.js
function (e) {
                    var keyCode = e.keyCode || e.which;
                    // If the user pressed enter
                    if (keyCode === 13) {
                        this.addRow();
                        // Get the last row viewEvents, then get the title field, then have jQuery
                        // find the input and trigger a focus event.
                        _.last(this.subs.get('row')).subs.get('title').$('input').trigger('focus');
                    }
                }
function (e) {
                    var keyCode = e.keyCode || e.which;
                    // If the user pressed enter
                    if (keyCode === 13) {
                        this.addRow();
                        // Get the last row viewEvents, then get the title field, then have jQuery
                        // find the input and trigger a focus event.
                        _.last(this.subs.get('row')).subs.get('title').$('input').trigger('focus');
                    }
                }
function ( e ) { var keyCode = e . keyCode || e . which ; // If the user pressed enter if ( keyCode === 13 ) { this . addRow ( ) ; // Get the last row viewEvents, then get the title field, then have jQuery // find the input and trigger a focus event. _ . last ( this . subs . get ( 'row' ) ) . subs . get ( 'title' ) . $ ( 'input' ) . trigger ( 'focus' ) ; } }
When the user presses enter, add a row
When the user presses enter add a row