I have the image and i am fade in and fade out the image on click.
But i want that if the same is present then it should not fadein/fadeout.
My jquery code is
switch(current_id)
{
case 'l1':
$("#left_img img").fadeOut(500, function() {
$(this).attr("src","rrr.gif").load( function() {
$(this).fadeIn(500);
});
});
break;
case 'l3':
$("#left_img img").fadeOut(500, function() {
$(this).attr("src","cc1.gif").load( function() {
$(this).fadeIn(500);
});
});
break;
If i click on link 1 then image A appears with fade effect.
but if i click again link 1 agan , then again i see fade effect . Is there any way i can avoid that if same link is clicked again