0
我坚持使用jquery和json更改attr src时如何淡入和淡出图像。我已经正确地改变了图像,但是想要添加淡化过渡。jquery如何在使用json更改attr src时淡入淡出图像
任何帮助和建议将不胜感激。
下面是我的代码
function(){
$j(".screenshots ul li#screen1").show();
$j(".items div a").click(function (event) {
var id = $j(this).attr("href");
//$j(".screenshots ul li img").fadeOut();
$j.ajax({
url: "/?func=square_images/get_json&IMAGE_ID="+id,
dataType: "json",
success: function(data) {
$j("#screen1 img").attr("src", data.medium_medium_src);
}
});
event.preventDefault();
});
}