.show() after .hide() doesn't always display
<p>I'm trying to show <code>&lt;div&gt;</code> depending on the operation chosen. I have put a list in the database that coordinates between the operation and the class of the <code>&lt;div&gt;</code>. When testing the code, it works several times, then randomly stops working. I verified the content; it's okay. It seems to be a problem or a bug when using .show() after .hide().</p>

<p>Any idea how to fix it?</p>

<pre><code>$("#ddlOperation").change(function() {
    var idState = $(this).val();

    // get the name of all classes and hide it
    $.getJSON("/Trademark/hideFirst", function(fiData) {
        $.each(fiData, function (index, itemData) {
            $('.' + itemData.Text).hide("slow");
        });
    });

    // get the class that must be shown
    $.getJSON("/Trademark/LoadFieldByOperation", { id: idState }, 
        function(fData) {   
            $.each(fData, function (index, itemData) {
                $('.' + itemData.Text).show("slow");     
    // doesn't work always even the itemData.Text contains the suitable string!
        });
});
</code></pre>
