im paraphrasing my question: the code below works fine, every block different by only a number
$('.topCellNav_1').mouseover(function(){
$('.cell_1').not(this).fadeTo(50,0.4);
});
$('.topCellNav_2').mouseover(function(){
$('.cell_2').not(this).fadeTo(50,0.4);
});
$('.topCellNav_3').mouseover(function(){
$('.cell_3').not(this).fadeTo(50,0.4);
});
$('.topCellNav_4').mouseover(function(){
$('.cell_4').not(this).fadeTo(50,0.4);
});
$('.topCellNav_5').mouseover(function(){
$('.cell_5').not(this).fadeTo(50,0.4);
});
and so on up to 19 or more ......
so the question is --- how to shorten the code above using loop
something like that:
var i=-1
while ( ++i < 19 ) {
$('.topCellNav_'+i).mouseover(function(){
$('.cell_'+i).not(this).fadeTo(50,0.4);
});
}
thanks