【发布时间】:2014-03-04 11:14:55
【问题描述】:
我想知道这个滑块是否可以响应?这个滑块工作得很好,因为它使用了一种很好的方式来滑动 css。我只需要让它响应。
目前仅显示 6 张图片,但当 width 为 780px; 时,我需要将其设置为 4 张
我不确定我能否用我的知识来解决它。
$('.items > .item', $container).each(function (i){
if (i % 6 == 0) {
$(this).nextAll().andSelf().slice(0, 6).wrapAll('<div class="wrap fadeIn"></div>');
}
else (i % 4 == 0){
var $window = $(window);
$window.resize(function resize() {
if ($window.width() < 768) {
$(this).nextAll().andSelf().slice(0, 4).wrapAll('<div class="wrap fadeIn"></div>');
}
});
}
});
【问题讨论】: