我正在为Nivo slider Jquery插件开发一个自定义导航缩略图滑块。
当缩略图滑块包含的缩略图少于或等于6个时,我尝试隐藏下一个锚点。
.nivo-control是缩略图的子项的锚点,它们都是.items的子项。
我已经试过了:
if ($('.items').children('.nivo-control') <= 6) {
$('a.next').css('display', 'none !important');
} else {
// Do something
}发布于 2011-09-30 23:36:09
使用
if ($('.items').children('.nivo-control').length <= 6) {
$('a.next').css('display', 'none !important');
} else {
// Do something
}发布于 2011-09-30 23:36:17
试试这个:
if ($('.items').children('.nivo-control').length <= 6) {
$('a.next').css('display', 'none !important');
} else {
// Do something
}https://stackoverflow.com/questions/7612751
复制相似问题