我試過的代碼是限制因素,當我點擊更多的加載另一個元素
jQuery(function($) {
var visible =3;
$('#sc li:gt('+(visible - 1)+')').hide();
$('#more').click(function() {
var Index = $('#sc').children('li:visible:last').index(),
nextIndex = currentIndex + (visible + 1);
$('#sc li').hide();
$('ul li:lt(' + nextIndex + '):gt(' + Index + ')').show();
});
});
我想限制的元素,但是當我點擊更多的什麼都不會發生。
創造一個小提琴請 – SarathSprakash
當我點擊更多,它不能加載下一個元素數據庫 – user2779464