Hide and show div using Jquery
<p>I am trying to hide a div which is easily done with hide function in jquery. But it is not working.The div is</p>

<pre><code>&lt;div id="antivirusAlertDiv"&gt;
            &lt;ul class="shielding_elements"&gt;
                &lt;li&gt;
                    &lt;%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.AlertMe ? true : false)%&gt;
                    &lt;label for="id_4"&gt;
                        Alert Me&lt;/label&gt;
                &lt;/li&gt;
                &lt;li&gt;
                    &lt;%= Html.RadioButton("antivirusAlertType", 0, antivirusAlertType == AntivirusAlertType.DonotAlert ? true : false)%&gt;
                    &lt;label for="id_5"&gt;
                        Don’t Alert&lt;/label&gt;
                &lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt; 
</code></pre>

<p>jquery code is:</p>

<pre><code>function ShowAndHide(id, state) {
        var $mydiv = $('#antivirusAlertDiv');
        if (state == false) {
            $mydiv.hide().html('');
            //  $('#uniform-antivirusAlertType').hide();
          //  $('#antivirusAlertDiv .shielding_elements li').hide();
            // $("input[name='antivirusAlertType']").attr("disabled","disabled");
            //                $("#" + id).addClass("hide");
            //                $("#" + id).removeClass("show");
        }
        else {
                  $mydiv.show();
            //$('#uniform-antivirusAlertType').show();
           // $('#antivirusAlertDiv .shielding_elements li').show();
            //$("input[name='antivirusAlertType']").removeAttr("disabled");
            //                $("#" + id).removeClass("hide");
            //                $("#" + id).addClass("show");
        }
    }
</code></pre>
