Jquery <;面积>;悬停标记

Jquery <;面积>;悬停标记,jquery,hover,area,Jquery,Hover,Area,在我的html中,我有两个标记,其坐标映射两个国家。我使用的工具生成了html和css。当我将鼠标悬停在某个区域上时,我希望它变得有点透明。。然而,这并没有发生。这是我的密码: <div class="cicka"> <area class="areas" shape="poly" coords="400,141,398,144,396,145,394,147,392,147,389,149,387,149,385,149,383,151,381,152,379,154,377

在我的html中,我有两个
标记,其坐标映射两个国家。我使用的工具生成了html和css。当我将鼠标悬停在某个区域上时,我希望它变得有点透明。。然而,这并没有发生。这是我的密码:

<div class="cicka">
<area class="areas" shape="poly" coords="400,141,398,144,396,145,394,147,392,147,389,149,387,149,385,149,383,151,381,152,379,154,377,155,375,156,378,162,379,168,385,172,383,176,379,177,381,182,386,185,392,186,397,190,392,192,388,193,385,194,384,196,384,201,383,205,389,206,392,212,389,215,387,219,385,222,385,228,387,234,391,234,396,239,400,244,400,250,396,249,392,249,389,249,392,254,398,259,400,264,400,270,398,270,394,269,391,270,392,276,396,282,401,286,406,291,409,297,413,294,418,299,423,301,430,302,430,307,425,309,421,310,420,314,422,319,427,323,428,329,434,333,439,339,441,345,441,352,447,355,446,347,448,342,452,339,457,338,463,339,469,338,471,334,477,333,483,333,485,329,492,329,498,330,499,327,505,328,508,324,511,321,511,317,507,314,508,309,507,303,507,299,511,298,516,299,517,294,521,291,523,288,525,283,521,281,519,277,516,274,513,274,511,272,509,269,506,265,505,261,503,259,501,254,501,249,502,246,505,242,508,239,509,232,506,228,503,225,504,219,508,217,514,218,513,214,508,213,504,211,502,209,498,211,496,215,493,218,490,218,489,214,487,213,482,213,479,212,476,209,473,209,469,209,467,207,463,206,464,202,470,203,468,199,463,196,465,193,468,191,467,187,463,187,458,185,456,183,453,182,451,181,449,178,448,176,445,176,441,176,443,173,445,171,445,167,443,164,445,161,440,160,438,159,437,156,434,152,428,150,428,148,426,146,423,144,423,141,420,143,418,141,416,140,415,140,410,140,408,144,406,143,406,141,405,142," href="" alt="" title=""   />
</div>

以及以下文件:

<script>
        $(".cicka").hover(function() {
      $(this).stop().animate({opacity: "0.2"}, 'slow');
    },
    function() {
      $(this).stop().animate({opacity: "1"}, 'slow');
    });
    </script>

$(“.cicka”).hover(函数(){
$(this.stop().animate({opacity:“0.2”},'slow');
},
函数(){
$(this.stop().animate({opacity:“1”},'slow');
});
当我在普通div上调用这个函数时,它会使它透明。然而,当我在一个包含一个区域的div上调用它时,什么都没有发生。你能告诉我我做错了什么吗


再次感谢

您可能希望创建一幅国家图像,为该图像指定一幅地图,并在悬停区域后更改图像的不透明度。创建地图

<img src="country1.jpg" alt="country1" usemap="#map1">

<map name="map1" class="areas">
<area id="area1" shape="poly" coords="......" alt="Country 1">
</map>


那么jQuery已经做到了这一点。我用的是在线发电机。我上传了一张图片,画出了区域,然后它返回给我html代码和css。我有地图和生成的区域你的html代码中有img吗?我认为jquery应该改变img的不透明性。你的评论是无用的。。请阅读我在前面的评论中写的内容