I am trying to fade in an image when I click on a link, but that gives me a “blink” on every fade. Is there anyway to avoid this blink and just have a clean fadeIn?
This is my current code:
function changeMortar(mortar) {
var html = '<img src="http://www.randerstegl.dk/fileadmin/fugefarver/GFXSharedMortars/fuge'+mortar+'.png" width="500" height="300">'
$("#fuge-color").hide().html(html).fadeIn('slow');
}
I have made this example
http://jsfiddle.net/BHCam/14/
It fades to white and then into the mortar I selected. What I want is to have my selected mortar, fade over the old mortar.
I have made some changes to your code. Try like this in HTML:
In CSS:
And The JavaScript code:
And in here you can find more information. And here is the running example in JsFiddle.