12
I'm using jQuery.data() to store jQuery DOM object references:
myObj.data('key', $('#element_id'));
I'll be using this a lot (for often the same DOM objects), so I wouldn't like to take up too much memory. Does jQuery store a reference, or does it store a deep copy of the DOM object? In that case I suppose it's better to store the element id instead of the element reference.