私は自分の div の子 li:nth-child(1) - li:nth-child(5) を最初に非表示にしてから、ユーザーがボタンをクリックしたときに child(6) - 10 を表示する方法を探しています。コードのバージョン:
$('.history_presss ul li').hide();
$('.history_presss ul li:nth-child(1)').show();
$('.history_presss ul li:nth-child(2)').show();
$('.history_presss ul li:nth-child(3)').show();
$('.history_presss ul li:nth-child(4)').show();
$('.history_presss ul li:nth-child(5)').show();
$('ul.jPag-pages li:nth-child(1)').click(function(){
$('.history_presss ul li').hide();
$('.history_presss ul li:nth-child(1)').show();
$('.history_presss ul li:nth-child(2)').show();
$('.history_presss ul li:nth-child(3)').show();
$('.history_presss ul li:nth-child(4)').show();
$('.history_presss ul li:nth-child(5)').show();
});
$('ul.jPag-pages li:nth-child(2)').click(function(){
$('.history_presss ul li').hide();
$('.history_presss ul li:nth-child(6)').show();
$('.history_presss ul li:nth-child(7)').show();
$('.history_presss ul li:nth-child(8)').show();
$('.history_presss ul li:nth-child(9)').show();
$('.history_presss ul li:nth-child(10)').show();
});