2012-01-05 2 views
1

원형 "no stop"을 위해 JCarousel을 구성 할 수 있습니까? 나는 연속적인 일정한 원형 이동을 위해 나의 회전 목마를 구성하고 싶다. 속도를 늦추지 않고. 0.1 및 애니메이션 :JCarousel circular "no stop"

감사

+0

jCarousel은 [오랫동안 알려진 문제] (http s : //github.com/jsor/jcarousel/issues/search? q = circular)을 순환 줄 바꿈으로 대체합니다. 개발자가 플러그인을 고칠 때까지는 사용하지 않는 것이 좋습니다. – Sparky

+0

[무한 회전판] (http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-infinite-carousel-plugin/)을 확인하십시오. 모든 예제는 무한하지만 5 번째 데모는 계속 실행됩니다. – j08691

답변

1

지속적으로 자동 설정할 수있을 것입니다 회전에 도착. 당신이 무엇을 원하는 속도 5000 (또는 아래 제대로 가야 나에게 오랜 시간이 걸렸 예입니다 . 그것은 그것은이 작업을 얻기 위해 잠시했다.이 사람을 도움이

var lis; //Global variable holding the data. 
    var myCarousel01; //Global variable holding the carousel. 

    $(document).ready(function() { 
     updateData(); 

     $("#tableapp").ajaxStop(function() { 
       InitiateCarousels(); 
      } 

      rebindCarousels(); 
     }); 

    }); 

    function updateData() { 
     $.get('AjaxPages/ApplicationMonitor.aspx', function (data) { 
      lis = $(data).find("li"); 
     }); 
    } 

function InitiateCarousels() { 
jQuery('#mycarousel1').jcarousel({ 
    wrap: 'circular', 
    auto:.1, //Amount of time you want slide to stop in seconds 
    animation:5000, //Desired speed in milliseconds 
    easing:"linear", //Prevents the slides from "slowing down" 
    initCallback: myCarousel01_initCallback, 
    itemFirstInCallback: myCarousel01_itemFirstInCallback 
}); 
}); 

function myCarousel01_initCallback(carousel, state) { 
    if (state == "init") { 
     myCarousel01 = carousel; //Bind carousel to global variable so you can retrieve it later. 
    } 
} 


    function rebindCarousels() { //This function gets called after data is binded to the lis variable. See: "ajaxStop" function above. 
     //Rebind Carousel01 
     myCarousel01.list.empty(); 
     $.each(lis, function (i, l) { 
      myCarousel01.add(i + 1, l); 
     }); 
     myCarousel01.size(lis.length); 
    } 

. jQuery를 AJAX를 통해 희망을 데이터를 점점하고 약간의 조정을 할 수 있도록 내가 여기 거친 복사/붙여 넣기를했다.이 도움이된다면, 대답으로 표시하십시오.