2011-12-15 2 views
0

jQuery에서 블록 전환을 만드는 가장 좋은 방법은 무엇입니까? 이 전환을 제공하는 플러그인이 있습니까 (전이, 나는 전환이있는 이미지 갤러리를 원하지 않습니다.)?jQuery에서 블록 전환을 만드는 방법

내가 처음 링크 http://codecanyon.net/item/jquery-banner-rotator-slideshow/full_screen_preview/109046

문제에 http://mitya.co.uk/scripts/Blockster-transition-effect-122 또는 대각선 확장 블록 전환과 같은 뭔가를 찾고 있어요 좀 더 블록을 사용하는 경우가 매우 낮다는 것이다. 전환이 두 번째 링크에서 어떻게 생성되었는지 파악할 수 없습니다.

답변

1

이 코드를 blockster.js에 144 행에 추가하면 더 많은 블록이 동시에 사라집니다.

/* ------------------ 
| ANIMATION - with all blocks built, set an interval to turn them all on, one by one. 
| When all blocks in position, and all have finished anim (if fade rather than simple) 
| - kill int 
| - shuffle slides so the one our blocks contain parts of is genuinely topmost 
| - remove blocks 
------------------ */ 
    var simultaneous = 5; 
for(var i = 0; i < simultaneous; ++i) 
{ 
    addTimer(nextSlide, thiss, i, simultaneous); 
} 
} 

function addTimer(nextSlide, thiss, i, simultaneousBlocks) 
{ 
    setTimeout(function() 
    { 
    var animInt = setInterval(function() 
     { 
     if(thiss.params.holder.children('.block:not(:visible)').length > 0)  
      { 
      var blocks = thiss.params.holder.children('.block:not(:visible)'); 
     with($(blocks.get(!thiss.params.random ? 0 : Math.floor(Math.random() * blocks.length)))) thiss.params.animType == 'simple' ? show() : fadeIn(thiss.params.blockAnimSpeed); 
    } 
    else if ($('.block:animated').length == 0) 
      { 
     clearInterval(animInt); 
     nextSlide.siblings().hide(); 
     nextSlide.show(); 
     $('.block').remove(); 
     } 
    }, thiss.params.blockAnimSpeed); 
}, (thiss.params.blockAnimSpeed/simultaneousBlocks) * i);  
} 
관련 문제