Ok I figured this one out using append and empty, except it emptys all
checkboxes. I tried using prev and :last, but that only worked for the last
checkbox checked not the current one.

$(document).ready(function(){
        $("[EMAIL PROTECTED]'checkbox']").click(function(){
                if ($(this).is(":checked")){
                        $(this).siblings("ul").hide("normal");
                        $(this).parent("li").append("<span
class='complete'>Complete!</span>");
                } else {
                        $(this).siblings("ul").show("normal");
                        $("[EMAIL PROTECTED]'complete']").empty();
                }
        });
});

Is there any way to limit the empty to the current selected checkbox?
-- 
View this message in context: 
http://www.nabble.com/Loop-Checkbox-Action-Question-tf3246372.html#a9077857
Sent from the JQuery mailing list archive at Nabble.com.


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

Reply via email to