jquery 取消全选和全选功能 不全选

代码如下

function ckSelectAll() {
if ($('#ckSelectAll').is(':checked') == true) {
$("INPUT[name='checkList']").each(function () {
if (false == $(this).is(':checked')) {
$(this).prop("checked", true);
}
});
}
if ($('#ckSelectAll').is(':checked') == false) {
$("INPUT[name='checkList']").each(function () {
if (true == $(this).is(':checked')) {
$(this).prop("checked", false);
}
});
}
}
代码如下
/**将下拉框选中的值追加到p里面**/
function checkValAppend(){
var checklist = [];
var str = '';
var len=$('.selk').find('li').find('.resourceType').length;
var checkedlen=$('input[name="veType"]:checked').length;
if(checkedlen<len){
$('.resource').prop('checked',false);
$('input[name="veType"]:checked').each(function(){
checklist.push($(this).parent().text());
str = checklist.join(',');
});
if(checklist.length==0){
$('.t_text').html('请选择');
}else{
$('.t_text').html(str);
}
}
}