我使用这段代码来改变不透明度,当用户打开和关闭一张图片不幸的是,当用户点击图片时,不透明度不会停留在1.任何人都有答案?帮助jquery animate()
$(document).ready(function(){
$('img#slide').animate({"opacity" : .7})
$('img#slide').hover(function(){
$(this).stop().animate({"opacity" : 1})
}, function(){
$(this).stop().animate({"opacity" : .7})
});
$('img#slide').click(function(){
$(this).animate({"opacity" : 1});
});
});
其中重要的是,在问题中包含代码,以便未来的搜索者可以从中受益,即使在pastebin删除了粘贴之后也是如此。我为你解决了这个问题。 – 2010-06-17 12:49:58