Ticket #5265 (closed bug: invalid)
jQuery.fn.data does not always behave in IE
|Reported by:||stephenr85||Owned by:|
I'm working on a project that uses a custom "Repeater" and "Accordion" class. The Repeater allows users to add or remove items, so the elements that represent the repeater's data are created dynamically. The Accordion class associates an expandable area with it's trigger using jQuery.data.
For example: j(section).data("Accordion.trigger", trigger)
This seems to work fine in Firefox, and doing a trace in IE shows that there is a DOM element stored there, but changing its properties has no effect.
I am working around this right now using a little plugin I wrote called jQuery.fn.dataDirect. This basically just stores the trigger reference as a property directly on the element. Storing and retrieving the section/trigger pairs works properly like that, so there is some disassociation going on in IE.