问题描述
我正试图在状态栏中禁用将鼠标悬停在突出显示上。我已经编写了这段JS代码。工作正常。但是问题出在Bootstrap 3 Modals上,它们坏了,无法正常工作,我该如何修改代码?有什么想法吗?
$(document).ready(function () {
setTimeout(function () {
$('a[href]').each(function () {
var href = this.href;
$(this).removeAttr('href').css('cursor','pointer').click(function () {
if (href.toLowerCase().indexOf("#") >= 0) {
} else {
window.location.href = href;
}
});
});
},500);
});
谢谢
解决方法
将此添加到CSS:
a[href] {
cursor: auto !important;
}