你好,我有一个这个脚本。
在悬停时,这会更改图像,但如何在此代码中添加淡入/淡出?
$(document).ready(function() {
$("#first_01").hover(function() {
$(".plan-select-01").find("img").attr("src", "https://example.com/img-1.png")
}, function() {
$('.plan-select-01').find("img").attr("src", "https://example.com/img-2.png")
})
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<li class="plan-select-01">
<section>
<img src="https://example.com/image-1.png" alt="" />
<div class="plan-hover">
<li id="first_01">hover the image</li>
</div>
</section>
</li>
&#13;