Can't get event fired (arrayChange)

54 Views Asked by At

Can't get Sortable+arrayChange to work at all,

An exact example for Sortable+arrayChangethere:

[https://jsfiddle.net/ethar1/a2k0vbqj/]

Could you please help me to find out why?

BorisMoore, Thanks for your great efforts..

1

There are 1 best solutions below

4
BorisMoore On BEST ANSWER

You need to listen to arrayChanges on the array, model.items not on the model.

$([model.items]).on("arrayChange", changeHandler); 

See:

https://jsfiddle.net/r3vce9yz/

https://www.jsviews.com/#onarrchange@jquery-on