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 ...
随机推荐
- Bsie(鄙视IE)
http://www.bootcss.com/p/bsie/ 欢迎,这是bsie项目主页. 简介 bsie弥补了Bootstrap对IE6的不兼容.Bootstrap是 twitter.com 推出的 ...
- 陈正冲老师对于c语言野指针的解释
那到底什么是野指针呢?怎么去理解这个“野”呢?我们先看别的两个关于“野”的词: 野孩子:没人要,没人管的孩子:行为动作不守规矩,调皮捣蛋的孩子.野狗:没有主人的狗,没有链子锁着的狗,喜欢四处咬人. 对 ...
- Java [leetcode 16] 3Sum Closest
题目描述: Given an array S of n integers, find three integers in S such that the sum is closest to a giv ...
- 【转】photoshop CS2安装激活破解教程
原文网址:http://www.16xx8.com/photoshop/jiaocheng/109348_all.html photoshop CS2安装教程:(本页介绍如何安装CS2软件,如果你安装 ...
- 一滴一点vim(学习+备忘)
普通模式: h j k l 分别是左下上右方式移动: :w 保存修改 :q 推出 :wq 保存修改并退出 :q! 放弃修改强制推出 x 删除光标所在位置字符 i 在光标所以位置插入字符 删除类命令: ...
- java设计模式—Adapter模式
1.核心意图: 将一个类的接口转换成客户希望的另外一个接口,从而使得原本由于接口不兼容而不能一起工作的类可以一起工作. 该模式的目标是通过一个代理(这里是Adapter),在原来的类(Adap ...
- 标准的TCP/IP工业以太网-EtherNet/IP
标准的TCP/IP工业以太网-EtherNet/IP 徐智穹以太网具有传输速度高.兼容性好.应用广泛等方面的优势,支持几乎所有流行的网络协议,其中 ...
- Leetcode OJ : Repeated DNA Sequences hash python solution
Total Accepted: 3790 Total Submissions: 21072 All DNA is composed of a series of nucleotides abb ...
- NOIP2006 能量项链
洛谷1063 能量项链 本题地址:http://www.luogu.org/problem/show?pid=1063 题目描述 在Mars星球上,每个Mars人都随身佩带着一串能量项链.在项链上有N ...
- 了解常见的 Azure 灾难
以下内容涵盖多种不同类型的灾难情况.数据中心故障不是应用程序范围内发生故障的唯一原因.设计不良或管理错误也会导致中断.请在恢复计划的设计和测试阶段设想可能导致故障的原因,这样做很重要.一个好的计划可充 ...