jquery-watch icon indicating copy to clipboard operation
jquery-watch copied to clipboard

whitespace after comma in properties makes your watcher not work as expected

Open bm2u opened this issue 8 years ago • 0 comments

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') {...}

bm2u avatar Jun 28 '16 10:06 bm2u