jQuery: Microsoft JScript runtim error: Object Expected
<p>I am new to jQuery. I am trying to display or hide a span based on the selection of a checkbox. Here's my code:</p>

<pre><code>&lt;script type = "text/javascript"&gt;
    $('#chkShowDescriptions').change(function () {
        var display = this.checked ? 'block' : 'none';
        $('.desc').css('display', display);
    }
    );
&lt;/script&gt;

&lt;p&gt;
    &lt;input type = "checkbox" id = "chkShowDescriptions" 
     name = "chkShowDescriptions" /&gt;Show Descriptions
&lt;/p&gt;

@if(@item.Description != null)
{
    &lt;span class = "desc" style = 
    "font-size: 0.7em; color: Gray; text-align: 
    justify; display: none;"&gt;
    Description: @item.Description&lt;br /&gt;
    &lt;/span&gt;
}
</code></pre>

<p>However, I get a run-time exception that says: <code>Microsoft JScript runtime error: Object expected</code></p>

<p>I am using IE 8 on Windows 7.</p>
