jquery加载图片时以淡入方式显示的方法

  作者:bea

本文实例讲述了jquery加载图片时以淡入方式显示的方法。分享给大家供大家参考。具体实现方法如下: 代码如下: <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title></title> </head> <script type="text/javascript"
本文实例讲述了jquery加载图片时以淡入方式显示的方法。分享给大家供大家参考。具体实现方法如下:


代码如下:


<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title></title>
</head>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
 $(function(){
  $("img[id='load']").load(function(){
   $(this).hide();
   $(this).fadeIn(5000);
  });
 });
</script>
<body>
<div></div>
<div>
 <img id="load" src="./images/11_b.jpg" />
</div>
</body>
</html>



希望本文所述对大家的jQuery程序设计有所帮助。


有用  |  无用

猜你喜欢