我有一个不透明度的元素,当我盘旋时我将其设置为零,我也将点击事件绑定到此链接,该点击事件在单击时执行操作,但此点击在IE中不起作用,只在其他浏览器中起作用。当IE中的不透明度为零时,我能做些什么才能让它仍然可以点击?
谢谢!
$("a.hover").mouseenter(function() {
$(this).animate({opacity:0});
});
$("a.hover").click(function(event) {
event.preventDefault();
//perform other stuff///
});
答案 0 :(得分:0)
HTML:
<a href="#" class="hover">My Link</a>
CSS:
.hover {
transition: opacity 0.3s;
}
.hover:hover {
opacity: 0;
}
JS:
$("a.hover").click(function (event) {
event.preventDefault();
//perform other stuff///
});
适用于Chrome,FF和IE 8 + 9
答案 1 :(得分:-1)
请在后台添加透明图片。