Alas, previous ones would ignore inline event handlers.
(function($){
$.fn.hasEvent = function(evt){
return !!($.data(this[0],"events")[evt]||this['on'+evt]);
};
})(jQuery);
or
$.expr[':'].event = function(a,i,m){
return !!($.data(a,"events")[m[3]]||a['on'+m[3]]);
};
On Jan 15, 7:18 pm,
(function($){
$.fn.hasEvent = function(evt){
return !!$.data(this[0],"events")[evt];
};
})(jQuery);
(only works for a single element)
$('#id').hasEvent('click');
You can make that into a selector if you want:
$.expr[':'].event = function(a,i,m){
return !!$.data(a,"events")[m[3]];
};
$('#
Hi, try this plugin:
http://james.padolsey.com/javascript/debug-jquery-events-with-listhandlers/
On Jan 15, 5:24 pm, KidsKilla wrote:
> hi everyone!
> is there any possibility to find out if there is event binded to the
> element?
>
> some kind of $("#id").is(":event(click)")
>
> now i'm using $
http://docs.jquery.com/Events/unbind
On Jan 15, 9:24 pm, KidsKilla wrote:
> hi everyone!
> is there any possibility to find out if there is event binded to the
> element?
>
> some kind of $("#id").is(":event(click)")
>
> now i'm using $("#id").is("[onclick]"); but it don't works if event is
> bi
4 matches
Mail list logo