我有以下代码在Firefox中有效但在IE中无效:
if ($('#interuptedClaim')) {
$(".removeHref li a,.removeHref li a:hover").removeAttr("href").css({
"cursor": "default",
"color": "grey"
});
}
$('#frontPageCancelButton').bind('click', function () {
$('#interuptedClaim').hide();
$('#enter-new-claim-menu-link').attr('href', 'create_claim.htm');
$('#resolve-deferral-menu-link').attr('href', 'resolve_deferral_selection_criteria.htm');
$('#update-pended-claim-menu-link').attr('href', 'update_pended_claim.htm');
$('#adjust-claim-menu-link').attr('href', 'adjust_claim.htm');
$('#adjust-subrogation-menu-link').attr('href', 'adjust_subrogation.html');
$('#void-claim-menu-link').attr('href', 'void_claim.htm');
$('#refund-processing-menu-link').attr('href', 'refund_processing.html');
$('#update-claim-menu-link').attr('href', 'update_claim.html');
$('#reopen-denial-menu-link').attr('href', 'reopen_denial.htm');
$(".removeHref li a").css({
"font-weight": "bold",
"cursor": "pointer",
"text-decoration": "none",
"color": "#000"
});
$("#sidebar a:hover").css({
"font-weight": "bold",
"cursor": "pointer",
"text-decoration": "none"
});
$(".removeHref li a.active").css({
"font-weight": "bold",
"cursor": "pointer",
"text-decoration": "none",
"color": "#9E0B0F"
});
$('removeHreF li a:hover').addClass('linkHover');
});
如何解决这个问题?
答案 0 :(得分:1)
在代码的末尾,您有$('removeHreF li a:hover')
。该选择器的开头应该有一个.
。
像这样:$('.removeHreF li a:hover').addClass('linkHover');