Trigger element's onclick method with JQuery [ASP.NET]
<p>I have an ASP.NET server control that inherits from CheckBoxList that renders the controls with a UL and LIs.  The control is set to AutoPostBack.  </p>

<p>Markup:</p>

<pre><code>&lt;div id="foo"&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;input id="..." 
                   type="checkbox" 
                   name="ctl00$MainContent$FooList$0"    

                   onclick="javascript:setTimeout(
                   '__doPostBack(\'ctl00$MainContent$FooList$0\',\'\')', 0)" /&gt;

            &lt;label ...&gt;...&lt;/label&gt;
        &lt;/li&gt;
        ...
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I would like to trigger the JavaScript that is rendered on the CheckBox when the parent LI is clicked.  Here is what I have so far:</p>

<pre><code>$("#foo li").click(function() {
    $(this).find("input:eq(0)").trigger("click");
});
</code></pre>

<p>This fires a postback in FF 3.x but the event handler in the codebehind is not fired.  In IE 7 a script error comes up and the browser just kind of hangs there for a bit then reloads the page.</p>

<p>How should I be doing this?</p>
