jquery-watch
jquery-watch copied to clipboard
whitespace after comma in properties makes your watcher not work as expected
This works perfectly
...
el.watch({
properties: "top,left,opacity,attr_class,prop_innerHTML",
// rest of your code
}
});
This not (only top property will be watched)
...
el.watch({
properties: "top ,left, opacity, attr_class, prop_innerHTML",
// rest of your code
}
});
You can not do things like that in your callback function:
var propChanged = data.props[ i ],
if ( propChanged === 'attr_class') {...}