1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<?php
?> <style> .hd_banner_pager {position: absolute;bottom:0;right: 10px;} .hd_banner_pager .hd_banner_circle {display: inline-block;margin: 0 1px;} .hd_banner_pager .hd_banner_circle a {display: block;width: 10px;height: 10px;border-radius: 50%;background: #d2d2d2;text-indent: -999999px;} .hd_banner_pager .hd_banner_circle a.active {background: #101010;} </style> <ul class='banner_ul_<?php echo $sk_idx;?>'> <?php $pagers = ""; foreach($bn_array as $key=>$bn){ if($bn['bn_link']!=''){ $a1 = "<a href='{$bn['bn_link']}' target='{$bn['bn_target']}'>"; $a2 = "</a>"; } if($key>0 && $main_slider=="Y"){ $display_hidden = "display:none;"; } else { $display_hidden = ""; } $pagers .= "<div data-slide-index='{$key}' class='hd_banner_circle'><a>{$key}</a></div>"; ?> <li><?php echo $a1;?><img src='<?php echo "{$j3['j3_data_url']}/banner/banner_{$bn['idx']}";?>' usemap='#<?php echo "banner_{$bn['idx']}";?>' style="<?php echo $display_hidden;?>"><?php echo $a2;?></li> <?php if($bn['bn_map']!=''){ // 이미지 맵이 있으면 처리 echo "<map name='banner_{$bn['idx']}' id='banner_{$bn['idx']}'>"; echo stripslashes($bn['bn_map']); echo "</map>"; } } ?> </ul> <div class="hd_banner_pager" id='bx-pager-<?php echo $sk_idx?>'> <?php echo $pagers; ?> <!--<div class="hd_banner_circle"><a class="active">1</a></div> <div class="hd_banner_circle"><a>2</a></div>--> </div> <script> $(function(){ var str = navigator.userAgent.toLowerCase(); //접속한 브라우저의 코드네임 소문자로 저장 if ( -1 != str.indexOf('msie') ) { // msie 라는 문자열이 있으면 setTimeout(function(){ // ie에서만 골뱅이 도는 경우가 있어서 딜레이 처리해줌 myslider<?php echo $sk_idx;?> = $('.banner_ul_<?php echo $sk_idx;?>').bxSlider({ slideWidth: 240, auto: true, captions: false, controls:false, pagerCustom: '#bx-pager-<?php echo $sk_idx?>' }); },400); } else { myslider<?php echo $sk_idx;?> = $('.banner_ul_<?php echo $sk_idx;?>').bxSlider({ slideWidth: 240, auto: true, captions: false, controls:false, pagerCustom: '#bx-pager-<?php echo $sk_idx?>' }); }
$("#bx-pager-<?php echo $sk_idx?> .hd_banner_circle a").click(function(){ myslider<?php echo $sk_idx;?>.goToNextSlide(); }); }); </script>
|