how to find the fieldset id in django's change_form.html using django jQuery
<p>I have many fieldsets in the change_form.html. Based on a click function I wish to hide/display some of the fieldsets. How do I get the fieldset id? There are more than 1 fieldsets. </p>

<p>In javascript 
eg.  $('fieldset')[1].hidden =true;  //false based on some condition</p>

<p>I want a django jQuery equivalent of the above statement.</p>

<p>I have tried, $("#fieldset")1 = true;
Also tried $("div.form-row.field1.field2").hidden = true;      </p>

<p>I want to use django.jQuery only as below. How to access the fieldset 1, 2 and the show/hide functionality.</p>

<pre><code>(function($){
    $(document).ready(function($){
 //function to hide/show the fieldset related to POP3_status
 // if it is checked, show fieldset[1] and fieldset[2]
//if  it is not checked, hide fieldset[1], fieldset[2]

    $("#id_pop3_status").click(function(){
        var checked = $("#id_pop3_status").is(':checked');

        //not a POP3 account
        if (!checked){
        alert('not clicked');
                $("#fieldset")[1].hide();

        }
        //if the POP3_status is checked i.e it is POP3 account
        else {
        alert('clicked');
                $("#fieldset")[1].show();
        }
    });
    });
})(django.jQuery);
</code></pre>
