Link to home
Start Free TrialLog in
Avatar of flashjordan
flashjordan

asked on

Pause Jquery Cycle when Fancybox opened

Hi,

I have a little issue with my site that I cannot solve. you can see the issue at conceptparadise.com/dm The problem is that when I open a flash animation in fancybox over the top of jquery cycle, the flash animation stahhers when the banners in the background rotate.

What I am trying to do and failing at it pausing the cycle plugin when the fancybox is opened and then resuming the cycle plugin once fancybox is closed.

I have attached the two example of code that I have at the moment and where i have got to. What I am going is probably wrong!!!

I would really appreciate any help that anyone could give me as I am going crazy with this..

Thank you in advance
<!-- Banner Rotator -->    
 <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript">
$(function() {
    $('#s3').cycle({fx: 'fade',speed: 1500 });
});
/*
$('#pauseButton').click(function() { 
    $('#s3').cycle('pause'); 
});
$('#resumeButton').click(function() { 
    $('#s3').cycle('resume', true); 
});
*/
$('#fancybox-wrap').show('slow', function() {
	alert('fancybox show');
    $('#s3').cycle('pause'); 
});
$('#fancybox-wrap').hide('slow', function() { 
    $('#s3').cycle('resume', true); 
});
</script>


<!-- Example of Fancybox call -->

$("#Dentiframe4buttons1").fancybox({
				'width':700, 
				'height':405,		
				'type':'iframe', 
				'autoScale':'false' 
			});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of kadaba
kadaba
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of flashjordan
flashjordan

ASKER

That is amazing, if I could give you more points I would as you have solved somethi9ng that has been causing me nightmares... Thank you so much!!!
Thank you :)