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!
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