为什么这个fadeOut()在Internet Explorer中不起作用?

mar*_*zzz 1 jquery internet-explorer fadeout

在IE7,IE8,IE9上测试 ......并且fadeOut()未应用:

<table>
    <tr class="sideOn hidden">
        <td class="trackBotton">
            <input type="submit" value="Remove" onClick="remSide(this);return false" />
        </td>        
    </tr>
</table>

function remSide(param) {
    $(param).parents('.sideOn').fadeOut(500, function() {
           $(this).remove();
    });
}
Run Code Online (Sandbox Code Playgroud)

为什么这样,我该如何解决这个问题呢?

删除remove()不起作用:

function remSide(param) {
    $(param).parents('.sideOn').fadeOut(500);
}
Run Code Online (Sandbox Code Playgroud)

Guf*_*ffa 5

JQuery使用过滤器在Internet Explorer中执行淡入淡出,而过滤器仅适用于具有布局的元素.

您可以像这样给表行布局:

.sideOn { position: absolute; }
Run Code Online (Sandbox Code Playgroud)

然后元素在Internet Explorer中淡出,但position不建议更改表行的样式,因此您应该使用其他元素来淡出.