2013-10-03 2 views
1

Cycle2 Pause On Hover 기능을 사용하려고하지만 역순으로 실행하도록 구현했습니다. 슬라이드 쇼는 호버에서 시작 (마우스가 이미지를 떠날 때 끝) 여기 jQuery image Cycle2 호버시 시작

여기

Cycle2 Pause On Hover - Demo

아래의 데모입니다 수 있도록 코드

<div class="cycle-slideshow" 
data-cycle-fx=fadeout 
data-cycle-timeout=1000 
data-cycle-pause-on-hover="true" 
> 
<img src="http://jquery.malsup.com/cycle2/images/p1.jpg"> 
... 
</div> 
+0

작동합니다 사이클 ('일시 정지') ('사이클 슬라이드 쇼를..'); 및 $ ('. cycle-slideshow') .mouseover (handler (eventObject))에서 순환 ('cycle-resumed')하지만 첫 번째 함수가 모든 것을 재정의합니다 – Mills

답변

4

당신이 있는지 확인에게 있습니다 사이클 슬라이드 쇼 div에서 data-cycle-pause-on-hover 속성을 제거하십시오.

그런 다음이 jQuery 코드는 내가 $를 사용하려고했습니다

$('.cycle-slideshow').cycle('pause'); 
$('.cycle-slideshow').hover(function() { 
    //mouse enter - Resume the slideshow 
    $('.cycle-slideshow').cycle('resume'); 
}, 
function() { 
    //mouse leave - Pause the slideshow 
    $('.cycle-slideshow').cycle('pause'); 
});