// Use a black icon for secondary (grey gradient) backgrounds.
if ($(this).hasClass('secondary') || $(this).css('color') === 'rgb(0, 0, 0)') {
filename = 'newwin-black-white-15-14.png';
}
以上代码在IE8中不起作用
答案 0 :(得分:0)
Internet Explorer 8不会返回颜色的rgb值,您应该按照以下步骤覆盖所有情况:
if ($(this).hasClass('secondary') || $(this).css('color') === 'rgb(0, 0, 0)' || $(this).css('color') === '#000' || $(this).css('color') === '#000000') {
filename = 'newwin-black-white-15-14.png';
}