[jQuery] How to test if an event is already bound to an object ?
Hello,
I want to add a default javascript function to all my internal links
that DON'T already have a behaviour.
If i do :
jQuery("a[@href^=/]").bind("click",function(){
//jQuery("#main").empty().append("Loading...").load ("/test");
jQuery("#main").load ("/xajax/"+this.pathname,{},function()
{this.style.opacity="1";}).fadeTo("slow",0.1);
return false;
});
(it replaces all the "normal" links by an ajax call) Then it applies
it also to links that have already a javascript event to it.
Is it possible to select only the links that don't have any event
bound to the click event ?
Thanks in advance,
Xavier