Hello guys,
I'm trying to implement a 'fade into' script which would affect two images :
<script type="text/javascript">
$(document).ready(function(){
$('img').mouseover( function() {
$(this).fadeOut(200, function() {
$(this).attr({'src':'http://example/images/image.png'});
if (this.complete) $(this).fadeIn(500);
});
});
});
</script>
This bit of jQuery gives me the following :
1 - first the image fades out and disappears 2 - then, from a blank space, it emerges the new one.
So I'd like to improve the script in order to get a real 'fade into' effect.
There's two great resources I have been exploring by now :
- Cycle Plugin - very cool (I will try to get that cycle effect on hover)
- JQuery for Designers cool , but I had a bunch of issues with IE (a strange black pixelated border on the fadeIn).
Thanks very much if someone can point out an eventual extra solution.
Jan
EDIT : CSS trick/solution here http://paragraphe.org/stackoverflowdemos/crossfade-images/