I need help figuring out why my flip function only fires once and them seems to unbind. Any ideas?

吃可爱长大的小学妹 提交于 2019-12-31 05:08:07

问题


I'm using 3 plugins here flip, delayed, and fancybox. I have it written so when you click the flip event fires, then delayed, then fancybox after the delay. I can't figure out why the flip is only working once but fancybox keeps working on subsequent clicks. Any tips would be appreciated. Thanks.

<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').off().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>

live example at www.crexendo.com/store/4313892

Thanks!


回答1:


Remove .off() then, seems your problem here/



来源:https://stackoverflow.com/questions/16966904/i-need-help-figuring-out-why-my-flip-function-only-fires-once-and-them-seems-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!