I am very new to jQuery, so please be careful.
I found two articles on the Internet:
I used both of these examples and was able to get them to work together:
http://www.marccohen.co.uk/dev/menu_example.htm
Fading convolutions in one list also activate animated freezes in another list, and vice versa. The problem is that as a result of jQuery I have a “very” long and so new for this, I have no idea how I can shorten it:
$(function() {
$(".menuicon1")
.find("span")
.hide()
.end()
.hover(function() {
$(this).find("span").stop(true, true).fadeIn({duration:300});
$('ul.hover_block li.slide1').find('img').animate({top:'192px'},{queue:false,duration:150});
}, function() {
$(this).find("span").stop(true, true).fadeOut({duration:300});
$('ul.hover_block li.slide1').find('img').animate({top:'276px'},{queue:false,duration:150});
});
$(".menuicon2")
.find("span")
.hide()
.end()
.hover(function() {
$(this).find("span").stop(true, true).fadeIn({duration:300});
$('ul.hover_block li.slide2').find('img').animate({top:'192px'},{queue:false,duration:150});
}, function() {
$(this).find("span").stop(true, true).fadeOut({duration:300});
$('ul.hover_block li.slide2').find('img').animate({top:'276px'},{queue:false,duration:150});
});
$(".menuicon3")
.find("span")
.hide()
.end()
.hover(function() {
$(this).find("span").stop(true, true).fadeIn({duration:300});
$('ul.hover_block li.slide3').find('img').animate({top:'192px'},{queue:false,duration:150});
}, function() {
$(this).find("span").stop(true, true).fadeOut({duration:300});
$('ul.hover_block li.slide3').find('img').animate({top:'276px'},{queue:false,duration:150});
});
$(".menuicon4")
.find("span")
.hide()
.end()
.hover(function() {
$(this).find("span").stop(true, true).fadeIn({duration:300});
$('ul.hover_block li.slide4').find('img').animate({top:'192px'},{queue:false,duration:150});
}, function() {
$(this).find("span").stop(true, true).fadeOut({duration:300});
$('ul.hover_block li.slide4').find('img').animate({top:'276px'},{queue:false,duration:150});
});
$(".menuicon5")
.find("span")
.hide()
.end()
.hover(function() {
$(this).find("span").stop(true, true).fadeIn({duration:300});
$('ul.hover_block li.slide5').find('img').animate({top:'192px'},{queue:false,duration:150});
}, function() {
$(this).find("span").stop(true, true).fadeOut({duration:300});
$('ul.hover_block li.slide5').find('img').animate({top:'276px'},{queue:false,duration:150});
});
$('ul.hover_block li.slide1').hover(function(){
$(this).find('img').animate({top:'192px'},{queue:false,duration:150});
$('.menuicon1').find("span").stop(true, true).fadeIn({duration:300});
}, function(){
$(this).find('img').animate({top:'276px'},{queue:false,duration:150});
$('.menuicon1').find("span").stop(true, true).fadeOut({duration:300});
});
$('ul.hover_block li.slide2').hover(function(){
$(this).find('img').animate({top:'192px'},{queue:false,duration:150});
$('.menuicon2').find("span").stop(true, true).fadeIn({duration:300});
}, function(){
$(this).find('img').animate({top:'276px'},{queue:false,duration:150});
$('.menuicon2').find("span").stop(true, true).fadeOut({duration:300});
});
$('ul.hover_block li.slide3').hover(function(){
$(this).find('img').animate({top:'192px'},{queue:false,duration:150});
$('.menuicon3').find("span").stop(true, true).fadeIn({duration:300});
}, function(){
$(this).find('img').animate({top:'276px'},{queue:false,duration:150});
$('.menuicon3').find("span").stop(true, true).fadeOut({duration:300});
});
$('ul.hover_block li.slide4').hover(function(){
$(this).find('img').animate({top:'192px'},{queue:false,duration:150});
$('.menuicon4').find("span").stop(true, true).fadeIn({duration:300});
}, function(){
$(this).find('img').animate({top:'276px'},{queue:false,duration:150});
$('.menuicon4').find("span").stop(true, true).fadeOut({duration:300});
});
$('ul.hover_block li.slide5').hover(function(){
$(this).find('img').animate({top:'192px'},{queue:false,duration:150});
$('.menuicon5').find("span").stop(true, true).fadeIn({duration:300});
}, function(){
$(this).find('img').animate({top:'276px'},{queue:false,duration:150});
$('.menuicon5').find("span").stop(true, true).fadeOut({duration:300});
});
});
Really appreciate any suggestions ...