How to hide the Div at the Click of the Button in MVC
<p>My application is in MVC3.I want a particular Div in my View to Hide at the click of the button.
Below is my Code that i tried.</p>

<pre><code> $(document).ready(function () { 
 $("#btnCompare").click(function () {
 if(MyCondition)
 {
    for(MyLoop)
    {
    }
}
}
});
</code></pre>

<p>My this code is not working.As well as i want to Div to Hide after the Click is called.
Please suggest</p>
