움직이는메인 질문입니다..

움직이는메인 질문입니다..

QA

움직이는메인 질문입니다..

본문

신입 웹디인데요 가르쳐줄사람이 사무실에 아무도없습니다 ㅜ

 

홈에 사진이 바뀌는 메인을 넣고싶은데 그런건 어디서 구할수있을까요 ㅜ 

 

이 질문에 댓글 쓰기 :

답변 1

<!--이미지 슬라이드-->
<?php include('/main_slide.php');?>

 

 

 

 

main_slide.php'

 

 

<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (!function_exists('imagecopyresampled')) alert('GD 2.0.1 이상 버전이 설치되어 있어야 합니다.');
//include_once($latest_skin_path.'/lib/thumb.lib.php');

$visible_cnt =7; //노출할 이미지 수
?>

<script type="text/javascript" src="/js/jcarousellite_1.0.1.min.js"></script>

 

<script type="text/javascript">
$(function(){
 $('#widgetScroll .imgList').jCarouselLite({
  visible: <?=$visible_cnt?>,
  auto: 1000,  //자동 스크롤 속도
  speed: 1000, //스크롤 이동 속도
  btnPrev: '#widgetScroll .btnPrev',
  btnNext: '#widgetScroll .btnNext'
 });
});
</script>

<style type="text/css">

</style>


<table border="0" >
<tr>
<td id="widgetScroll" background="/shop/img/main/main_slide_bg.jpg" style="background-repeat: no-repeat;">
   <div class="best_btn01">
     <!-- <img src="<?php echo G5_SHOP_URL; ?>/images/main/best_left.png"class="btnPrev"> -->
   </div>
       <div class="imgList">
    <ul>

        <?

 

                  $query_53 = "SELECT * FROM `g5_shop_item`ORDER BY `it_id` DESC  LIMIT 0 , 7  ";

 

  $result_53 = sql_query($query_53);
    while ($row_53 = sql_fetch_array($result_53))
    {
 ?>
                  <li >
                            <a href="./shop/item.php?it_id=<?= $row_53[it_id]?>">
            <img src="./data/item/<?= $row_53[it_img1]?>" width="132" height="118" border="0" alt=""> </a>
 <br><font class="slide_t"><?= $row_53[it_name]?></font>
 
 </li>

 <?}?>


    <!-- <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl01.png"><br><font class="slide_t">청수오디</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl02.png"><br><font class="slide_t">블랙초크베리</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl03.png"><br><font class="slide_t">마가목</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl04.png"><br><font class="slide_t">왕대추</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl05.png"><br><font class="slide_t">칠자화</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl06.png"><br><font class="slide_t">바이오체리</font></li>
    <li><img src="<?php echo G5_SHOP_URL; ?>/img/main/sl07.png"><br><font class="slide_t">꾸지뽕</font></li>  -->
    </ul>
    </div>
   <div class="best_btn02">
  <!-- <img src="<?php echo G5_SHOP_URL; ?>/images/main/best_right.png"class="btnNext"> -->
   </div>

</td>
</tr>
</table>

 

 

 

 

 

 

jcarousellite_1.0.1.min.js


(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery); 

답변을 작성하시기 전에 로그인 해주세요.
전체 105
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT