我有一个需要监听输入和属性更改的ItemView(对于旧的IE版本)。输入事件工作正常,但propertychange似乎没有绑定
events:
'input .textArea': 'someFunction'
'propertychange .textArea': 'someFunction'
当我使用on
和off
ex。
@textArea.on, 'input propertychange', someFunction
这只是一个无法通过ItemView的events
绑定的事件吗?
虽然我知道listenTo
的文档可以用于backbone.js上的事件列表。有没有办法可以通过该方法绑定两个事件。即
@listenTo textArea, 'input properychange', someFunction
P.S我在onpropertychange
中尝试了events
,但也无效。此外,它需要是属性更改而不是keypress/keyup
等事件
答案 0 :(得分:0)
'input .textArea': 'someFunction'
不应该是
'input.textArea': 'someFunction'
代替? selecto 'input .textArea'
表示在输入中有一个类名为textArea
的元素。可能不是你想要的......