Need help with slideshow mouse-out effect

292 views Asked by At

I am trying to get my slideshow to go to the first slide in the slideshow after you mouseout of the navigation bar on the bottom i have changed already the pagerEvent to mouseover and i don't know how to make it mouseout to the first slide. I am new to jquery. thank

 //Feature Cycle Setup   
            $j('#cycle').cycle({ 
                fx: '<?php if(pagelines('feffect')):?><?php echo pagelines('feffect');?><?php else:?>fade<?php endif;?>',
                sync: <?php if(pagelines('fremovesync')):?>0<?php else:?>1<?php endif;?>,
                timeout: <?php if(pagelines('timeout')):?><?php echo pagelines('timeout');?><?php else:?>0<?php endif;?>,
                speed:  <?php if(pagelines('fspeed')):?><?php echo pagelines('fspeed');?><?php else:?>1500<?php endif;?>, 
                cleartype:true,
                cleartypeNoBg:true,
                pager: 'div#featurenav',
                pagerEvent: 'mouseover',
1

There are 1 answers

0
JohnP On

In your hoverOut method, just add

$j('#cycle').cycle(0); 

That will take you to the first slide

I don't think you can capture the mouseOut event of the pager for cycle, but you could do it with jquery

$j('#slideshow').hover(
    function() {//anything you want to do when mousing in},
    function() {$j('#cycle').cycle(0);}
);

TIP : You might want to clean up your PHP code

Instead of

<?php if(pagelines('timeout')):?><?php echo pagelines('timeout');?><?php else:?>0<?php endif;?>

Try

<?php echo (pagelines('timeout')) ? pagelines('timeout') : 0 ?>

This assumes that pagelines('timeout') is defined. Otherwise use isset().