jQuery - Call a function in another frame
<p>jQuery - How to invoke a function defined in a frame from another frame.</p>

<p>Please see the <a href="http://jsbin.com/ajomuc/12/edit#javascript,html" rel="nofollow">jsbin link</a>. I tried the solution mentioned <a href="http://stackoverflow.com/questions/3501080/javascript-jquery-calling-function-in-another-frame">here</a>, but couldn't successfully complete it.</p>

<p><b>EDIT</b></p>

<p>To make it easier to understand, I have put the following code,</p>

<pre><code>&lt;frameset rows="25%,*"&gt;
  &lt;frame src="framea.html" id="framea"/&gt;
  &lt;frame src="frameb.html" id="frameb"/&gt;
&lt;/frameset&gt;
</code></pre>

<p><b>framea.html</b></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
 &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(function() {
var methoda = function() {
    alert('in method a');
}
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    Frame 1
 &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><b>frameb.html</b></p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(function() {
var methodb = function() {
      //$('#framea')[0].contentWindow.methoda();
}

methodb();
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    Frame 2
 &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I'm looking for a jQuery way of invoking the function in another frame.</p>
