我需要一个Caroufredsel,当我选中/取消选中某些复选框时,我必须过滤这个caroufredsel (隐藏/取消隐藏元素),我尝试向该项添加/删除一个类,并通过jquery将caroufredsel items.filter配置设置为该类,但它不起作用,这就是我所做的:
$("#myc").carouFredSel({
circular: true,
items: {
visible: 4,
filter: ".i-visible"
},
auto: false,
prev: "#a_prev",
next: "#a_next"
});当我在每个复选框中单击时:
$('.mycheckbox').click(function () {
var checked = this.checked;
$(this).parent().children("#myc").children(".item").each(function () {
$(this).toggleClass("i-visible");
});
});发布于 2013-12-13 22:17:37
我也有同样的问题。我试着将items选项“可视”设置为“变量”,这似乎是可行的。
https://stackoverflow.com/questions/20148694
复制相似问题