JQuery运行不了(2)

来源:互联网 发布:知乎 上海天华设计院 编辑:程序博客网 时间:2024/04/20 23:03

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>index6.html</title>
 
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
   
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

 <!-- hover()opacity  实现 阴影效果 与animate 结合使用   -->
 <script src="http://code.jquery.com/jquery-latest.js"></script>
 <script type="text/javascript">
  $(function(){
      $('#contaiter img').animate({
         "opacity":.5
      });
     
     
      $('#contaiter img').hover(
      function(){$(this).stop().animate({"opacity",1});),
      function(){$(this).stop().animate({"opacity",.5});
      });
  
  });
 
 </script>
 
  </head>
 
  <body>
    <div id="contaiter">
     <img src="1.jpg" alt="image" />
     <img src="2.jpg" alt="image" />
    </div>
  </body>
</html>

 

 

以上代码运行没效果,谁帮我看看hover方法是否有写...

原创粉丝点击