jQuery 1.4.4+ includes this already, using DOMElement.getAttribute(), but for prior versions you can bind an element to the getData event. This event is fired internally by jQuery.fn.data if you attempt to retrieve data for a key that has no corresponding value in the data cache. The event handler can then be used to query the […]
↧