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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.