Jquery Mouseover不能用于IE [英] Jquery Mouseover doesn't work IE

查看:243
本文介绍了Jquery Mouseover不能用于IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在鼠标悬停时显示并覆盖另一个图像,这是一种菜单。这适用于chrome和firefox。任何想法?来了

I need to show and image over another image when mouseover, this is a kind of menu. This works in chrome and firefox. Any Idea? Here comes the come

<div id="button1OverStyle" class="buttonOverStyle" onclick="changeFrame('main/main.html')" >
<img id="button1OverStyleImage" src="images/button_home.png" height="24" width="46" />



<script>      
  $('#button1OverStyle').hover(function(e) {
    showTittle('button1OverStyleImage');  });
  $('#button1OverStyle').mouseleave(function(e) {
    hideTittle('button1OverStyleImage');});
  $('#button2OverStyle').mouseover(function(e) {
    showTittle('button2OverStyleImage'); });
  $('#button2OverStyle').mouseleave(function(e) {
    hideTittle('button2OverStyleImage'); });      
</script>






我找到了在哪里找到它。这是问题


I found where to find it. And This is the problem

此行

<div id="button1OverStyle" class="buttonOverStyle" onclick="changeFrame('main/main.html')" >
            <img id="button1OverStyleImage" src="images/button_home.png" height="24" width="46" />
        </div>

这里有CSS

.buttonOverStyle{   position:absolute;  cursor:pointer;     z-index:1000;   height:24px;}  .buttonOverStyle img {   display:none;}

问题是如果图像不显示Internet Explorer无法识别div,因此无法进行mouseenter或mouseover。

The problem is that if the image is not display the internet explorer does not recognize the div, so it can't make the "mouseenter" or "mouseover".

任何IDEA ??? ???

推荐答案

解决方案!

I在Css中全部使用但不透明度

I make it all in Css but with opacity

.buttonOverStyle img {
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
filter: alpha(opacity=10);
opacity: .1;}


.buttonOverStyle img:hover {
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
filter: alpha(opacity=90);
opacity: .9;}

这对我有用

这篇关于Jquery Mouseover不能用于IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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