ASP.NET Jquery check is checked not working
<p>I have an onChange event for a checkbox which fires a function that toggles the Visibility of some TRs. My problem is this code only works in firefox. I want it to work for ie8.</p>

<pre><code>function toggleVisibility() {

    if ($("#ctl00_PageContent_chkVisibility").is(':checked')) {
        $('#ctl00_PageContent_freight_rate_column_chaair tr').each(function(i, val) { // Loop through rows in grid
            if (i &gt; 9 &amp; i &lt; 28) {
                $('#ctl00_PageContent_freight_rate_column_chaair_r' + i).hide();
            };
        });
    }
    else {
        $('#ctl00_PageContent_freight_rate_column_chaair tr').each(function(i, val) { // Loop through rows in grid
            if (i &gt; 9 &amp; i &lt; 28) {
                $('#ctl00_PageContent_freight_rate_column_chaair_r' + i).show();
            };
        });
    };
};
</code></pre>

<p>Does anyone know a better way of doing this?</p>

<p>Thanks</p>
