IE jquery mouseenter,mouseover超奇葩问题
做了个项目,结构很简单
<div class="index-main" data-url="./img/index_default.jpg">
<p class="main-bg" data-init="img"><img src="./img/index_default.jpg" alt="" /></p>
<h1 class="index-logo">
<a href="index.php"><img src="./img/index_logo.png" alt="RAMAD" /></a>
</h1>
<div class="index-cont">
<ul>
<li class="ramad" data-url="./img/index01.jpg">
<strong class="tl"><a href="javascript:;"><span>RAMAD</span> 莱蒙达<em class="line"></em></a></strong>
<div class="cont">
<span class="line"></span>
<a href="aboutus.php" data-url="./img/index03.jpg">RAMAD介绍</a>
<a href="aboutus.php" data-url="./img/index02.jpg">RAMAD理念</a>
</div>
</li>
<li data-url="./img/index04.jpg">
<strong class="tl"><a href="javascript:;">品牌历史</a></strong>
<div class="cont">
<span class="line"></span>
<a href="history.php" data-url="./img/index05.jpg">品牌历史</a>
<a href="customize.php" data-url="./img/index06.jpg">定制历史</a>
</div>
</li>
<li data-url="./img/index07.jpg">
<strong class="tl"><a href="javascript:;">赏&析</a></strong>
<div class="cont">
<span class="line"></span>
<a href="idea.php" data-url="./img/index09.jpg">析 · <span class="arial">STORY</span></a>
<a href="idea.php" data-url="./img/index08.jpg">赏 · <span class="arial">ART</span></a>
</div>
</li>
<li data-url="./img/index10.jpg">
<strong class="tl"><a href="javascript:;">产品展示</a></strong>
<div class="cont">
<span class="line"></span>
<a href="product.php" data-url="./img/index11.jpg">西服</a>
<a href="product.php" data-url="./img/index13.jpg">衬衫</a>
<a href="product.php" data-url="./img/index12.jpg">其他</a>
</div>
</li>
<li data-url="./img/index16.jpg">
<strong class="tl"><a href="javascript:;">服务体系</a></strong>
<div class="cont">
<span class="line"></span>
<a href="idea.php" data-url="./img/index14.jpg">定制流程</a>
<a href="idea.php" data-url="./img/index15.jpg">核心体系</a>
</div>
</li>
</ul>
</div>
<div class="index-foot">
<div class="cont">
<p class="fl">浙ICP-88880000号 丨 <a href="#">集团网站入口</a> 丨 TEL:1512634984</p>
<p class="fr"><a href="#">中文版</a> 丨 <a href="#">ENGLISH</a></p>
</div>
</div>
</div>
$(".index-cont li").mouseenter(function() {
alert($(this).index());
});
这里的mouseenter时灵时不灵,原因是.main-bg用的绝对定位,.index-cont相对定位覆盖在上面,IE在一个绝对定位元素里面没有内容, 没有背景的时候, 鼠标覆盖不到 .........解决方法加个透明的背景就解决了
IE jquery mouseenter,mouseover超奇葩问题的更多相关文章
- jquery中mouseover和mouseenter的区别
jquery中mouseover和mouseenter的区别 一.总结 一句话总结: 见名知意:enter(进入)和over(在上方)的意思好好思考一下 mouseover就是从子元素回到自己的时候也 ...
- jquery mouseenter()方法 语法
jquery mouseenter()方法 语法 作用:当鼠标指针穿过元素时,会发生 mouseenter 事件.该事件大多数时候会与 mouseleave 事件一起使用.mouseenter() 方 ...
- 一款由jquery实现的超炫的页面加载特效
今天为大家带来一款由jquery实现的超炫的页面加载特效.连续的几个页面分开特效.最后由三维的线条由远至近消失,然后由近至远出现.效果超级梦炫.一起看下效果图: 在线预览 源码下载 实现的代码. ...
- 基于jquery和svg超炫的网页动画
今天给大家分享一款基于jquery和svg超炫的网页动画.这款动画效果非常炫.下面还有重播.慢速.和反向动画按钮.效果非常漂亮.一起看下效果图: 在线预览 源码下载 实现的代码. html代码: ...
- jQuery关于mouseover和mouseenter的区别
原生的mouseenter是dom3级的事件,对于jQuery等一些框架已经实现了这个事件.但是它到底跟mouseover有什么区别? jQuery在实现这两个事件的时候,mouseover支持事件冒 ...
- jQuery事件--mouseover()、mouseout()、mouseenter()和mouseleave()
mouseover([[data],fn]) 概述 当鼠标指针位于元素上方时,会发生 mouseover 事件.该事件大多数时候会与 mouseout 事件一起使用 注释:与 mouseente ...
- jquery mouseout mouseover 多次执行
用jquery,mouseout,mouseover,随着鼠标移动,事件被触发了多次(冒泡),换成js onmouseover,onmouseout也是一样.最终的解决办法是,用jquery,mous ...
- jQuery因mouseover,mouseout冒泡产生的闪烁问题
由于浏览器的冒泡行为.造成如果在一个DIV元素上同时定义了mouseover,mouseout的时候,当鼠标移动到DIV中的child子元素的时候,就会同时执行了两个操作mouseover和mouse ...
- jQuery中mouseover和mouseout冒泡产生闪烁问题
问题:在jQuery中,对元素绑定mouseover和mouseout事件时,每次移入移出该元素和子元素时,都会触发事件,从而会出现闪动的现象. 原因:浏览器的冒泡行为. 解决方案: 使用mousee ...
随机推荐
- 更改nginx默认的网页目录
默认网站根目录为/usr/local/nginx/html,要将它改成/homw/www vi /usr/local/nginx/conf/nginx.conf 将其中的 loca ...
- 选择select框跳出信息
<html > <body > <select type="select" name=s1 onChange=alert("你选择了&quo ...
- unix network programming(3rd)Vol.1 [第2~5章]《读书笔记系列》
13~22章 重要 第2章 传输层: TCP/ UDP / STCP (Stream Control Transmission Protocol) TCP 可靠,有重传机制,SYN队列号 UDP 不可 ...
- HDU 4393 Throw nails
Throw nails Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- 陈灯WGF双缓冲绘图框架
“木丸子童屋”,专售各类儿童玩具,价格优惠,请大家多多支持:http://shop65552598.taobao.com/ WGF(windows graphic foundation)为window ...
- unix 文件属性
在unix下提到文件属性,不得不提的一个结构就是stat,stat结构一般定义如下: struct stat { dev_t st_dev; /* ID of device containing fi ...
- bzoj 3198 [Sdoi2013]spring(容斥原理+Hash)
Description Input Output Sample Input 3 3 1 2 3 4 5 6 1 2 3 0 0 0 0 0 0 4 5 6 Sample Output 2 HINT [ ...
- Hdu 5289-Assignment 贪心,ST表
题目: http://acm.hdu.edu.cn/showproblem.php?pid=5289 Assignment Time Limit: 4000/2000 MS (Java/Others) ...
- C# 多个个Dictionary合并更优雅的写法
Dictionary 现在有两个Dictionary的对象,想把两个对象的中数据合并成一个. 使用for循环的话觉得非常不合适,于是考虑是否有相应的方法,网上找了很多,都是for循环,最后终于找到了一 ...
- Hadoop HDFS概念学习系列之hdfs里的文件下载闲谈(二十六)
hdfs里的文件下载 可以,通过hadoop distributed system来下载,而且速度非常之快.涨知识!!! 或者,通过命令行的方式,也可以! ********************** ...