Javascript 在我尝试预加载图像后,jQuery效果不起作用

Javascript 在我尝试预加载图像后,jQuery效果不起作用,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我正在使用此网站的代码预加载图像: 为什么我选择在index.html中预装所有img时使用: <script type='text/javascript'> $(function(){ $('.images').imgPreload() }) </script> 那么我的跳跃效果在cindy.png和cindy_jump.png图像上不起作用 以下是我的主要文件: script.js $document.readyf

我正在使用此网站的代码预加载图像: 为什么我选择在index.html中预装所有img时使用:

<script type='text/javascript'>
       $(function(){
           $('.images').imgPreload()
       })
</script>
那么我的跳跃效果在cindy.png和cindy_jump.png图像上不起作用

以下是我的主要文件:

script.js

$document.readyfunction{ //等待窗口加载 $window.loadfunction{ //在屏幕外设置加载程序动画 $.se控制前淡出流;; }; //辛迪跳跃效应 $'.cindy'。单击,函数{ $'.cindy'.slideUp1000,函数{ $this.find'img'.html; $'.cursor'.css'display','none'; $'.cursor_jump'.css'display','inline'; $'.cindy_jump'。向下滑动1000; $'caption'。如果愿意,可以替换为或不替换。; }; }; //反跳 $'.cindy_jump'。单击,函数{ $'.cindy_jump'.slideUp1000,函数{ $this.find'img'.html; $'.cursor_jump'.css'display','none'; $'.cursor'.css'display','inline'; $'.cindy',向下滑动1000; $'caption'。请看我跳。; }; };
};您指的是两个不同版本的jquery和。删除较早的版本,因为它是较旧的版本。。那应该可以了!谢谢你抓住古鲁帕萨。但是,现在我的cindy_jump.png在我希望它首先隐藏时是可见的,而jQuery效果仍然不起作用。是否更改了css设置,使cindy_jump图像不显示并使用jquerySorry显示?我忘了包括cindy和cindy_jump css。事实上,我一开始并没有展示它。这些效果只有在我添加预加载后才起作用。cindy{margin top:30vh;height:250px;display:inline;margin left:auto;margin right:auto;}。cindy:hover{cursor:pointer;}。cindy_jump{height:225px;width:auto;margin bottom:150px;margin top:20vh;display:none;margin;margin left:auto;margin right:auto;}.cindy_jump:hover{cursor:pointer;}.cursor{margin top:30vh;height:20px;}.cursor_jump{margin top:20vh;height:20px;display:none;}