클릭하면 뒤집을 때까지 기다렸다가 지연시킨 다음 fancybox로 팝업합니다. 지연 후 fancybox를 실행시키기 위해 알아낼 수있는 유일한 방법은 지연된 플러그인과 .trigger ('클릭')를 사용하여 지연 후에 실행하는 것입니다. 문제는 계속해서 .trigger ('클릭')을 계속해서 발사하는 것이고 다른 모든 것을 죽이는 .off()가 없으면 멈추는 방법을 찾을 수 없다는 것입니다. 나는 정말로 약간의 제안에 감사 할 것이다.아무도 내 .trigger ('클릭')가 fancybox 이벤트를 계속해서 발사하는 것을 막을 수있는 방법을 찾아 낼 수 있습니까?
<script type="text/javascript">
jQuery.noConflict();
// First Home Page Popout Box
jQuery(document).ready(function() {
jQuery('#card-processing-link').live('click', function() {
jQuery('#card-processing-box').flip({
'direction' : 'lr',
speed : '300'
});
});
//Fancybox popout event
jQuery('#card-processing-link').delayed('click', 400, function(){
jQuery(this).trigger('click').fancybox({
'onStart' : function(){
jQuery('#card-processing-box').hide();
jQuery('#card-processing-popout').show();
},
'transitionIn' : 'elastic',
'transitionOut' : 'fadeOut',
'speedIn' : 300,
'speedOut' : 500,
'width' : '420',
'height' : 'auto',
'scrolling' : 'no',
'centerOnScroll' : 'true',
'overlayColor' : 'transparent',
'onClosed' : function(){
jQuery('#card-processing-popout').hide();
jQuery('#card-processing-box').fadeIn();
}
});
});
});
</script>
-1로 실행을 지연 할
setTimeout
을 사용할 수 있습니다 : 당신은 이미 여기 http://stackoverflow.com/q/16966904/1055987 그 질문을 ... 답이 나오지 않았다면 좀 더 구체적인 질문이 필요 하겠지만 (같은 질문이 아니라면) 도움을 더 빨리 얻을 수 있다는 의미는 아닙니다. – JFK