Impossible to hide a DIV in ASP.NET MVC
<p>I have some trouble to hide some div in my application, this code is used in jQuery UI tabs.</p>

<p>In the controller :</p>

<pre><code>public ActionResult MyAction()
{
    return View("MyView", model);
}
</code></pre>

<p>In the view "MyView", I have this :</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function () {
    $('#divToHide1').hide();
    $('#divToHide2').hide();
});
&lt;/script&gt;


&lt;div id="divToHide1"&gt;
&lt;/div&gt;   

&lt;div id="divToHide2"&gt;
&lt;/div&gt;   
</code></pre>

<p>The problem the div are never hidded, any idea ?</p>

<p>Thanks,</p>

<p>Update1 :
when I switch to second tab, I do the prcedure below. The switch to thez tab is ok, I receive an "alert1", and I receive "1" correspondinf to the length, but the div is still visible.</p>

<pre><code> function e2() {
    var jqxhr = $.post("/Controller/MyAction", function (data) {
        $('#tabs-2').html(data);
    })
    .success(function () {
        alert('alert1');
    })
    .error(function () { })
    .complete(function () {
        alert($('#divToHide1').length);
        $('#divToHide1').hide();    
    });
}
</code></pre>

<p>Update2 : I tried with class instead of id ... and look ok</p>
