Jump to content

jQuery function tip/help needed. How to extend a function?


RJP1

Recommended Posts

Hi guys,

 

I'm a bit rubbish at jquery, sometimes I can get it to do as I want, other times I can't... Can you help me find the correct place to insert an extra bit to this jquery code? The code is used to fade images and it works well. However, I'm finding it hard to figure out how to get it to pause the rotation and swap in a completely different image upon mouseover.

 

Basically, this code will rotate 2 images, but the hover over image will be different (and a link). Can anyone point me in the correct direction please? Cheers, RJP1

 

<script type="text/javascript">
(function($){
$(document).ready(
function(){
	$('ul#<?php echo $uniqueid; ?>').innerfade({
	speed: <?php echo $speed; ?>,
	timeout: <?php echo $timeout; ?>,
	type: '<?php echo $display; ?>',
	containerheight: '<?php echo $height; ?>px'
	});
});
})(jQuery);
</script>

Hi thorpe, sorry, yeah I know that. What I want to do is have the above function working as is (i.e. rotating 2 images). But when I hover over it, show a different image. I have got this far, and have managed to hide the image again on mouseout. However, re-hovering over the innerfade does not re-initiate the hover image... Any ideas of how to make this functionality correctly?

 

Cheers, RJP1

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.