I'd like this piece of javascript to change only on hover instead of making it a permanent background.
<script type="text/javascript">
$(function () {
$('ul.slideshow-menu').find('a').fadeTo('slow', 1);
$('ul.slideshow-menu').find('a').hover(function () {
$(this).fadeTo('fast', 1);
$('.pikachoose').css({
'background-image': 'url(' + $(this).attr('src') + ')'
});
}, function () {
$(this).fadeTo('slow', 1);
});
});
</script>
Right now it looks for an image i set in my "a href" tag and it takes this url to the class ".pikachoose" and replaces its background image. I want it to do this only on HOVER and when nothing is hovered it changes back to the original background-image.
Anyone got any ideas?