I'd like to know if there's any reason to use jQuery's data over expando properties.
I'm converting a script that's currently using multiple event listeners to use only one listener on parent object, and wish to read arbitrary data objects from the element being clicked on (thus given through the event.target
).
An old question regarding this problem exists here - Using jQuery's datastore vs. expando properties The answer that was given there is not explanatory at all and the memory leaks were fixed long time ago.
Thanks,
Bar Harel