Make it work with jQuery 1.8+

Retrieve events using $._data(element, 'events');