Basically, the below jQuery code code allows me to swap one image to another on hover, but I want it to fade from the first image to the other and I don't have the knowledge to make that work (I have searched for some answers and I have also tried to do it myself).
The thing with this question is that there seems to be a lot of people asking it, but on the few that I've found that may have slightly helpful answers (in terms of what I'm trying to do at least), they still aren't what I'm looking for.
I have a working script from here (http://www.selfcontained.us/2008/03/08/simple-jquery-image-rollover-script/), I just want the fadein effect, I've tried to mess around with it myself but jQuery is still a weak spot of mine, lol
<script type="text/javascript">
$(function() {
$('img[data-hover]').hover(function() {
$(this)
.attr('tmp', $(this).attr('src'))
.attr('src', $(this).attr('data-hover'))
.attr('data-hover', $(this).attr('tmp'))
.removeAttr('tmp');
}).each(function() {
$('<img />').attr('src', $(this).attr('data-hover'));
});;
});
</script>
<img src="../logo/Untitled-31.fw.png" data-hover="../logo/Untitled-31.png" />
Here (http://jqueryfordesigners.com/image-cross-fade-transition/) and here (http://jqueryfordesigners.com/image-fade-revisited/) are great examples of what I'm looking to do, but it's a lot more code than I would think is needed.
Any and all ideas are welcomed! Also, if anyone has any easier routes to take, I wouldn't mind that either haha. Thanks!