bxslider 를 이용해서 진행하고 있는데요. for문을 한번 더써서 되긴하는데요.
ajax로 진행하려면 어떻게 해야 하는지를 모르겠네요ㅠ.ㅠ
소스는 아래와 같습니다.
<script src="https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.5/jquery.bxslider.min.css"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.5/jquery.bxslider.min.js" rel="stylesheet" />
<!-- 리스트 썸네일 시작 -->
<section id="bo_v_atc">
<div class="image-wrap">
<ul id="bxslider">
<?php for ($i=0; $i<count($list); $i++) {
if($i>0 && ($i % $bo_gallery_cols == 0))
$style = 'clear:both;';
else
$style = '';
if ($i == 0) $k = 0;
$k += 1;
if ($k % $bo_gallery_cols == 0) $style .= "margin:0 !important;";
$image[$i] = G5_URL."/data/file/$bo_table/".$list[$i][file][$i][file];
?>
<li>
<img src="<?php echo G5_DATA_URL.'/file/'.$bo_table.'/'.get_view_thumbnail($list[$i][file][0][file]); ?>" class="first-img" />
<img src="<?php echo G5_DATA_URL.'/file/'.$bo_table.'/'.get_view_thumbnail($list[$i][file][1][file]); ?>" class="second-img" />
<img src="<?php echo G5_DATA_URL.'/file/'.$bo_table.'/'.get_view_thumbnail($list[$i][file][2][file]); ?>" class="third-img" />
</li>
<?php } //for ?>
<?php if (count($list) == 0) { echo "<li class=\"empty_list\">게시물이 없습니다.</li>"; } ?>
</ul>
<ul id="bxslider-pager">
<?php for ($z=0; $z<count($list); $z++) { ?>
<?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$z]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height']);
if($thumb['src']) {
$img_content02 = '<li data-slideIndex="'.$z.'"><a href=""><img class="first" src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$board['bo_gallery_width'].'" height="'.$board['bo_gallery_height'].'"></a>';
} else {
$img_content02 = '<span style="width:'.$board['bo_gallery_width'].'px;height:'.$board['bo_gallery_height'].'px">no image</span>';
}
echo $img_content02;
?>
<?php } //for ?>
</ul>
</div>
</section><!-- 리스트 썸네일 끝 -->
<script>
$('#bxslider').bxSlider({
pagerCustom: '#bxslider-pager'
});
</script>