$(function () {
showGradient();
$('.scrollwrap').on('scroll', showGradient);
});
function showGradient2() {
const scrollWidth = Math.ceil($('.list_box').scrollLeft() + $('.list_box').width());
const totalWidth = $('.list').width();
let test = $(this).children('.list')[0]
let test2 = $(this).find('li').get().length / 2;
if ($('.list_box').scrollLeft() == 0) {
$('.scrolllo2').text('스크롤 처음입니다.');
} else if (scrollWidth >= totalWidth) {
$('.scrolllo2').text('스크롤 끝입니다.');
$(this).find('li').clone().appendTo($(this).children('.list'));
} else if (scrollWidth > 3000) {
$('.scrolllo2').text('스크롤 중간입니다.');
console.log(test)
$(this).children('.list').replaceWith(test)
console.log($(this).children('.list'));
}
}