I would try somehting like this:

$(document).ready(function(){
        $('[EMAIL PROTECTED]'checkbox']).change(function(){

                If ($(this).is(":checked")){ 
                        $("div.sub2").hide("slow");
                } 
                else
                { 
                        $("div.sub2").show("slow");
                }

        });
});


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Gorkfu
Sent: samedi 17 février 2007 23:02
To: [email protected]
Subject: [jQuery] Loop Checkbox Action Question


So far I have this:


$(document).ready(function(){
                if ($("[EMAIL PROTECTED]'checkbox']").is(":checked")){ 
                        $("div.sub2").hide("slow");
}
                
                else if ($("[EMAIL PROTECTED]'checkbox']").not(":checked")){ 
                        $("div.sub2").show("slow");
}

});


I'm trying to get this to loop through every time someone checks or unchecks
a checkbox. With the above code it only uses it once when page loads.

How would I make it loop? I thought maybe AjaxStart or using $.post might
work, but I'm not sure how to implement those into this code. Any help or
advice would be appreciated, thanks in advance. =)
--
View this message in context:
http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9024559
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

-- 
Ce message Envoi est certifié sans virus connu.
Analyse effectuée par AVG.
Version: 7.5.441 / Base de données virus: 268.18.1/690 - Date: 16/02/2007
14:25
 


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to