ここまでのコードは、一連の<li>
項目をフェードアウトします。The next_arrow
最新の div をリストの一番下に追加し、スライド ショーの先頭にあるように見せます。
ただし、 でコードをミラーリングしようとすると、コードがleft_arrow
壊れて完全にフェードアウトしli
ます。
$('li:first-child').siblings().hide();
$('.right_arrow').click(function () {
$(this)
.parent('.container')
.find('li:first-child')
.fadeOut(200, function () {
$(this).next().fadeIn(200);
$(this).appendTo('ul');
});
});
$('.left_arrow').click(function () {
$(this)
.parent('.container')
.find('li:first-child')
.fadeOut(200, function () {
$(this).prev().fadeIn(200);
$(this).appendTo('ul');
});
});