Animating “src” attribute

后端 未结 7 588
轮回少年
轮回少年 2020-12-11 21:39

I have an HTML document. It looks like this:

\"original\"

When the user hovers \"stackinfo\" image, I w

7条回答
  •  星月不相逢
    2020-12-11 22:24

    function troca_imagem(url) {
        $('#foto_grande').animate({ opacity: 0 }, 500, function () { document.getElementById('foto_grande').src = url; });
        $('#foto_grande').animate({ opacity: 1 }, 500);
    }
    

提交回复
热议问题