<input type="checkbox" data-listen="selectAll" style="width: 20px; height: 20px;margin: 0 auto; display: block">
selectAll: function (s) {
$("#feed_list_rev :checkbox").prop('checked', s.prop('checked'));
},
<button type="button" id="np-s" data-listen="addRecommend" class="am-btn am-btn-xs am-btn-warning am-round ">推荐到首页</button>
addRecommend: function (s) {
var chk_value = [];
$('input[name="chek"]:checked').each(function () {
chk_value.push($(this).val());
});
if (typeof chk_value == 'object' && chk_value.length > 0) {
$.post('/cp/feeds/recommend', {rec: chk_value}, function (msg) {
layer.open({
content: 'SUCCESS'
});
});
} else {
layer.open({content: '请勾选要添加的内容!'});return false;
}
}