How to find an element by events attached to it
<p>I know I can attach an custom event like this</p>

<pre><code>$("#customDropdownBox").on("clickOutside", function(){
    $(this).hide(300, hideCallback);
})
</code></pre>

<p>I know I can attach a click event on the body to find every elements which has the custom event attached to them like this</p>

<pre><code>$("body").on("click", function(event){
    $.each($("body *"), function(i, o){
        if($._data(o, "events") &amp;&amp; $._data(o, "events")["clickOutside"])
            $(o).trigger("clickOutside");
    })
})
</code></pre>

<p>I was wondering if there could be a faster way of doing this without having to loop through ALL (*) elements of the DOM. I know I can filter by using something like </p>

<pre><code>$("body div.classx")
</code></pre>

<p>but I'd rather not hardcode a specific ID or class. I was wondering if there was a kind of selector that could acheive this. Something like </p>

<pre><code>$("body *{event:'clickOutside'}")
</code></pre>

<p>or</p>

<pre><code>$.findEvent("clickOutside");
</code></pre>
