Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backbone.js text change event

How do I trigger a change event on textbox in a backbone view?

I tried:

events: {
    "onChanged input.autocomplete": "update"
}

update didn't get fired. I also tried change.

What is the name of the event for textchange?

like image 936
Shawn Mclean Avatar asked Jul 13 '11 03:07

Shawn Mclean


1 Answers

This should work:

events: {
    "change input.autocomplete": "update"
}
  1. Is the selector (input.autocomplete) correct?
  2. Change fires on blur, not on keydown - does this agree with your requirement?
like image 81
Geoff Moller Avatar answered Oct 29 '22 20:10

Geoff Moller