trigger click event in iframe parent window
<pre><code>&lt;div id="main"&gt;
    &lt;a id="mainp" &gt;Parent Window&lt;/a&gt;

    &lt;iframe id="iframeindex" src="iframeindex.html" &gt;

    &lt;/iframe&gt;
&lt;/div&gt;

&lt;script&gt;
     $(function() {
        $('#mainp').live('click', function(e) {
            alert("hi");
            e.preventDefault();
        });
</code></pre>

<p>iframeindex source:</p>

<pre><code>&lt;a id="child1" class="test" href="a.html"&gt;aa&lt;/a&gt;    

&lt;script&gt;
    $(function() {          
        $('.test').click(function(e){           
            $('#mainp', window.parent.document).css('color', 'red').trigger('click');

            e.preventDefault();
        })
    });
</code></pre>

<p>CSS is getting applied on parent window link but click event is not getting trigger.
How can i send trigger event to parent window. </p>
