Is there any way to attach custom data to elements? Kind of like the $.data() function in jQuery?
I know you can subclass and element and add custom parameters, but it would be an overkill to create custom class just to add a single custom parameter.
Is there any way to attach custom data to elements? Kind of like the
Share
If I understand your question….
You can create new properties on any given object at runtime using syntax like this:
I’m not sure I’d recommend it in most situations.