(function($){$.fn.hasEvent=function(type){var events=this.data('events');return(events&&events[type])}})(jQuery);