Amit Kumar Kannaujiya Amit Kumar Kannaujiya - 1 year ago 166
jQuery Question

listen to change input in backbone

How to register to change in text of input in backbone. I have to listen every time text in label changes .
I had tried this but not worked .

var cashback = CustomBackbone.Components.LabeledInput({
state: {
label: "Cashback",
value: rowData.cashback_perc

inputAttributes: {
name: "cashback_perc",
type: "number"
className: "col-md-3",
events: {
'change input': 'updateFilter'


LabeledInput is extended from backBone view .

Answer Source

The event listener should be only change not change input, if the input is the root element of the component. If you want "live" updates, use keyup instead of change

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download