判断checkbox的checked状态(jQuery写法)

$('#checkboxInput').click(function(){
    if (this.checked){
        $('.questionContainer').css({
            "opacity":1,
            "visibility":"visible"
        });
    }else {
        $('.questionContainer').css({
            "opacity":0,
            "visibility":"hidden"
        });
    }
});

 

posted @ 2016-02-19 12:13  戎码之路  阅读(159)  评论(0编辑  收藏  举报