Is there any way to identify the attribute change event in KnockoutJS?
I found solutions in jQuery: Firing event on DOM attribute change .
But it would be good if I can do it with KO.
Is there any way to identify the attribute change event in KnockoutJS?
I found solutions in jQuery: Firing event on DOM attribute change .
But it would be good if I can do it with KO.
If the attribute change is bound to a property in your view model, then you can simply subscribe to that property to get notified of changes.
myViewModel.myProperty.subscribe(function(newValue) {
alert("This property changed!!");
});