I have a background image that rotates every 20 seconds, fading in and out. The images consist of a logo at the top-left corner and a person image at the right side from top to bottom. However, I want only the person image to fade in and out while keeping the logo fixed without any fading effect.
My question is how can I apply fadeIn and fadeOut effects only to a portion of the background image?
Here's my current jQuery code:
$("DIV#background IMG").eq(0).fadeIn(1000, function(){
setTimeout("changeBackground(0)",20000);
});
changeBackground = function (i){
curr_index = i;
nex_index = ((i + 1) > 3 ) ? 0 : i + 1;
$("DIV#background IMG").fadeOut(1000)
$("DIV#background IMG").eq(nex_index).fadeIn(1000, function(){
setTimeout("changeBackground(nex_index)",20000);
});
}
Note: The above code is correct and working successfully.
Thanks.