Jquery - infinite loop
<p>I have a webpage which has a button placed inside a div.
What i want to achieve is when users click on the div, it would trigger the button inside clicked. The code is something like:</p>

<pre><code>&lt;div id='main'&gt;     
 &lt;input id="button" type="button" onclick="javascript:dosomething();"  value="submit" /&gt;
&lt;/div&gt;


&lt;script type="text/javascript"&gt;
    $(function(){
     $('#main').bind('click', function(){
      $('#button').trigger('click');
     })
    })
&lt;/script&gt;
</code></pre>

<p>When executed (click on the div), it would throw javascript error "too much recursion".
It kinda makes sense why its infinite loop there but I'm not sure what is the right way to achieve this action? 
(plz dont ask me why i want it that way, its not my code!)</p>

<p>thanks for your kindy help! </p>
