세로로 흐르는 슬라이드로 변경

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
세로로 흐르는 슬라이드로 변경

QA

세로로 흐르는 슬라이드로 변경

본문


<style type="text/css">
.RollDiv{margin:0 auto; width:260px; height:100%;border:1px solid red;overflow:hidden;}  
.RollDiv > ul{overflow:hidden;height:100%;width:260px list-style:none; margin:0; padding:0; }
.RollDiv > ul > li{ float:left; display:block;}  
.RollDiv > ul > li > img{ width:260px; height:auto;margin-bottom:20px;}
</style>
 
<div class="slide_wrap">
  <div class="RollDiv">  
    <ul>  
      <li href=""><img src="http://placehold.it/260x80" /></li>  
      <li href=""><img src="http://placehold.it/260x120" /></li>  
      <li href=""><img src="http://placehold.it/260x60" /></li>  
      <li href=""><img src="http://placehold.it/260x70" /></li>  
      <li href=""><img src="http://placehold.it/260x60" /></li>  
      <li href=""><img src="http://placehold.it/260x60" /></li>  
      <li href=""><img src="http://placehold.it/260x60" /></li>  
    </ul>  
  </div>   
</div>
 
<script>
// moveType (0:left / 1:right) 
var moveType = 1; 
// 이동시간간격 3초 
var moveSpeed = 3000; 
// 움직이는 작업중 다시 명령 받지 않음 
var moveWork = false; 
// 일시정지 flag 
var movePause = false; 
function imgMove(){ 
    if(moveWork==false){ 
       // 0d\일경우 left방향 
      if(moveType==0){ 
         // 맨처음 이미지의 폭 
         var aWidth = $(".RollDiv > ul > li:first").width(); 
         // 롤링마지막에 맨처음의 a태그 추가 
         $(".RollDiv > ul").append("<li href=\""+$(".RollDiv > ul > li:first").attr("href")+"\">" + $(".RollDiv > ul > li:first").html()+ "</li>"); 
         // 맨처음이미지를 왼쪽으로 이동시킨다. 
         $(".RollDiv > ul > li:first").animate({marginLeft:-aWidth},{duration:moveSpeed,step:function(){ 
         // 이동중 만약 일시정지 flag가 true라면 
         if(movePause==true){ 
            // 이동을 멈춘다 
            $(this).stop(); 
         } 
         },complete:function(){ 
         // 이동을 마친후 첫번째 a태그를 지워버린다 
         $(this).remove(); 
         // 이미지 움직이는것을 다시 실행 
         imgMove(); 
      }}); 
      }else{ 
      // 마지막 a태그의 폭 
       var aWidth = $(".RollDiv > ul > li:last").width(); 
       // a태그 앞에 마지막의 a태그를 생성한다 단 스타일은 마지막 a태그의 폭만큼 빼준다 
       $("<li href=\"" + $(".RollDiv > ul > li:last").attr("href")+ "\" style=\"margin-left:-" + aWidth + "px\">" + $(".RollDiv > ul > li:last").html()+ "</li>").insertBefore(".RollDiv > ul > li:first") 
       // 맨처음 a태그의 margin-left를 다시 0으로 맞춰준다. 
      $(".RollDiv > ul > li:first").animate({marginLeft:0},{duration:moveSpeed,step:function(){ 
       // 이동중 만약 일시정지 flag가 true라면 
       if(movePause==true){ 
          // 이동을 멈춘다 
          $(this).stop(); 
       } 
       },complete:function(){ 
       // 이동을 마친후 마지막 a태그를 지워버린다 
       $(".RollDiv > ul > li:last").remove(); 
       // 이미지 움직이는것을 다시 실행 
       imgMove(); 
    }}); 
 } 
 } 
 } 
 function goMove(){ 
    // 일시정지가 풀려있을 경우를 대비하여 일시정지를 풀러준다 
    movePause=false; 
    // 0d\일경우 left방향 
    if(moveType==0){ 
       imgMove(); 
       }else{ 
       $(".RollDiv > ul > li:first").animate({marginLeft:0},{duration:moveSpeed,step:function(){ 
       // 이동중 만약 일시정지 flag가 true라면 
       if(movePause==true){ 
          // 이동을 멈춘다 
          $(this).stop(); 
      } 
       },complete:function(){ 
      // 이동을 마친후 마지막 a태그를 지워버린다 
      //$(".RollDiv > div > a:last").remove(); 
      // 이미지 움직이는것을 다시 실행 
      imgMove(); 
   }}); 
}
   
}
imgMove();
$('.slide_wrap').mouseover(function(){
  movePause=true;
});
$('.slide_wrap').mouseleave(function(){
  goMove();
});
</script>

 

세로로 흐르는 슬라이드를 찾다가 못찾아서ㅜ

가로로 흐르는 슬라이드를 찾아서 적용했는데요ㅜ

 

저걸 세로로 흐르게 하려면 어떻게 수정해야 하는지 알수 있을까요?

스크립트 초보라ㅜ 도와주세요

 

이 질문에 댓글 쓰기 :

답변 1

https://swiperjs.com/demos

https://swiperjs.com/demos/090-vertical/core.html

이전 질문에 달린 댓글에

보니 세로 방향 스크롤이 있네요.

아ㅠ 하나씩 돌아가는게 아니라 높이가 서로 다른 이미지들이 그냥 줄지어서 위로 멈추지않고 계속 올라다가 마우스 올릴때만 멈추는 제이쿼리를 찾는중이라서요ㅠ
swiper 으로는 어떻게 수정을 해야 할지 모르겠어서 아예 다른걸 찾아봤던 거라서요.. 답변 감사합니다~

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

회원로그인

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