나는 내 div child li : nth-child (1) - li : nth-child (5)를 먼저 말하면 사용자가 버튼을 클릭 할 때 show child) - (10) 아래 코드의 더 긴 버전 :persudo에 대한 jQuery 짧은 코드
$('.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();
});