Javascript jQuery淡入不工作

Javascript jQuery淡入不工作,javascript,jquery,fade,Javascript,Jquery,Fade,这是我的问题,我想在延迟4秒后显示一个图像,但这根本不起作用,你能帮我吗?下面是我的代码 html(index.html): JavaScript(button_fade.js): 使用$(this)而不是this您需要按以下顺序加载脚本: <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="scripts/fadein.js"></script

这是我的问题,我想在延迟4秒后显示一个图像,但这根本不起作用,你能帮我吗?下面是我的代码

html(index.html):

JavaScript(button_fade.js):


使用
$(this)
而不是
this

您需要按以下顺序加载脚本:

<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="scripts/fadein.js"></script>
<script src="scripts/button_fade.js"></script>


谢谢你的回复,但这并不能使它正常工作,仍然没有发生任何事情,根本没有出现任何图像。@Cwtch22这个问题和另一个答案可以解决,我想是的!非常感谢!非常感谢你!真是个愚蠢的错误!:)我现在给你的答案打勾:)谢谢!
.delayImg {opacity:0;}
$(document).ready(function() {
$(".delayImg").each(function() {
    this.onload = function() {
        $(this).animate({opacity: 1}, 4000);
    };
    this.src = this.getAttribute("delayedSrc");
});
});
$(document).ready(function() {
      $(".delayImg").each(function() {
      $(this).onload = function() {
      $(this).animate({opacity: 1}, 4000);
   };
   $(this).src = $(this).getAttribute("delayedSrc");
   }); 
});
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="scripts/fadein.js"></script>
<script src="scripts/button_fade.js"></script>