鼠标悬停在图像上闪烁 [英] Image flashing on mouse over

查看:86
本文介绍了鼠标悬停在图像上闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张地图上的图像,我在图像地图上还有来自少数区域(蓝色)的其他几张图像。其他图像代表鼠标悬停时应显示的蓝色区域。但我有一个问题。当我将鼠标放在图像地图上的区域上时,它们会开始闪烁。例如,当我将鼠标悬停在特定区域上时,我想要激活蓝色区域,而不是闪烁onmouseover和onmousemove。这是代码和我遇到的问题的链接。如果有任何遗漏或需要更改,请帮助我。







http://jsfiddle.net/NPFWm/6/

I have an image from a map and I have several other images from few regions (which are blue) on the image map. The other images represent the blue regions that should show on mouse over. But I have a problem. When I put the mouse over the regions on the image map, they start flashing. For example, I want to activate the blue region WITHOUT THE FLASHING onmouseover and onmousemove when I hover over the specific region. Here is link from the code and the problem that I am having. Please help me if there's anything missing or has to be changed.



http://jsfiddle.net/NPFWm/6/

推荐答案

我无法解决它立即,因为它会花费太多时间,因为几何是复杂的,但需要大的改变,但我可以解释什么是错的,你怎么能解决它。



首先,我删除了你的闪烁代码。您可以使用更紧凑的模式来处理鼠标输入/输出事件:

I cannot fix it immediately, because it would get too much time, as you geometry is complex, but will need big change, but I can explain what's wrong and how can you fix it.

First of all, I removed your flashing code. You can use more compact schema of handling mouse in/out events:


' 。world_map_container area')。each( function (){
// 为鼠标悬停事件分配操作
('.world_map_container area').each(function () { // Assigning an action to the mouseover event


)。悬停(
功能(){
var country_id =
(this).hover( function () { var country_id =


这篇关于鼠标悬停在图像上闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆