Simulate a document.body click event
<p>I am having a big of an issue. 
I have some third party js includes and they popup some info on a button click, that is in an iframe. Of course, I don't have access to this iframe. But the 3rd party captures clicks and closes the iframe popup. So the behaviour is like so -</p>

<p>I am a user, I click on this "3rd party button, an iframe popups up anchored bottom right". Now, if click anywhere on the main parent page (my page), the iframe closes.</p>

<p>Here is the problem. I have some custom form fields/spans etc.... in which I capture the clicks before they bubble up so the document.body never get that "click".</p>

<p>How can I fake this out? I tried "mousedown" and that seems to propagate up. So I then said something like:</p>

<pre><code>jQuery(document.body).mousedown(function(){
    jQuery(document.body).click();
})
</code></pre>

<p>so, no matter what is mousedown, I try to say there is a click happening. BUT that doesn't work. Not sure why? If I attach that click onto a div and alert - it alerts, but perhaps "natively" it isn't the same.</p>

<p>Any ideas of to truly simulate a body click event when/if the element clicked on has had its native clicked event captures before it can bubble up?</p>

<p>EDIT: I have tried various things.
ie:</p>

<pre><code>&lt;div id="captureclick"&gt;&lt;/div&gt;
&lt;script&gt;
jQuery(document.body).mousedown(function(){
    jQuery("#captureclick").click();
})
&lt;/script&gt;
</code></pre>

<p>I also tried:
    jQuery's trigger function trigger('click');</p>

<p>Not working. I haven't tried using a button as the "click traget", yet.
Thanks.</p>
