다음 작업을 수행하는 더 좋은 방법이 필요합니다. 10 행 이후의 성능이 저하되어 사용할 수 없게됩니다. 100 이상에서는 브라우저가 잠겨 있습니다.ie8 얼룩말 테이블 행과 호버
이것은 인트라넷 ie8 enviro이므로 ie8에서 작동해야합니다.
$('table.vgrid tr.xodd').hover(
function(){
$(this).removeClass('xodd');
$(this).addClass('rowhover');
}
,
function(){
if ($(this).attr("class")=='rowhover')
{
$(this).removeClass('rowhover');
$(this).addClass('xodd');
}
}
);
$('table.vgrid tr.xeven').hover(
function(){
$(this).removeClass('xeven');
$(this).addClass('rowhover');
}
,
function(){
if ($(this).attr("class")=='rowhover')
{
$(this).removeClass('rowhover');
$(this).addClass('xeven');
}
}
);
html은 테이블에 vgrid 클래스가 있고 tr 행이 번갈아 나타날 수 있습니다.
몇 가지 방법을 시도해 보았습니다. 모두 끔찍하게 수행합니다. 얼룩말 효과 이상으로, 다른 JS 키잉으로 현재 클래스를 키워야하므로, 클래스를 사용하는 것은 사이트의 절반을 다시 코딩해야한다는 두려움 때문에 경계선입니다.
제안 사항?
덕분에, 나는 이전에 시도했다 이것은 예상대로 작동하지 않는다는 것을 알았습니다. 나는 X-UA 헤더를 강제로 문서 모드에서도 표준 모드로 전환시켜야한다는 것을 잊어 버렸다. – briansol