title: how to trigger a click event from within an iframe to an element of its parent?
body: <p>How can I trigger a click event from within an iframe to an element of its parent?</p>
  
  <p>I tried the following code on the parent page before I open the iframe.</p>
  
  <pre><code>jQuery('iframe').contents().bind('eventhandler', function() {               
                  alert('event was fired');
          }); 
  </code></pre>
  
  <p>I also tried </p>
  
  <pre><code>jQuery(document).bind('eventhandler', function(e) {
  alert('event was fired');
  }); 
  </code></pre>
  
  <p>and within the iframe I have embeded this code in a click event</p>
  
  <pre><code>jQuery(document).trigger('eventhandler');                      
  </code></pre>
  
  <p>but it does't work am I doing something wrong here?</p>