admin管理员组文章数量:1023838
I'm using JQuery to fade-out rows (TR) when the user clicks a Delete button on a row (TR). By fade-out, I mean the entire row (TR) background-color is changed to an off red and then it fades to white and disappears. This is a great little animation for showing the user an instant reaction for what the did.
The JavaScript looks like this:
$(tr).css("background-color", "rgb(255,200,200)");
$(tr).fadeOut(500, RemoveDomElement);
This works beautifully in Firefox, Safari, Opera and Chrome, but - of course - not in IE. IE will execute the code and finish the cleanup, but the actual fade-out animation isn't shown.
What can I do for IE?
I'm using JQuery to fade-out rows (TR) when the user clicks a Delete button on a row (TR). By fade-out, I mean the entire row (TR) background-color is changed to an off red and then it fades to white and disappears. This is a great little animation for showing the user an instant reaction for what the did.
The JavaScript looks like this:
$(tr).css("background-color", "rgb(255,200,200)");
$(tr).fadeOut(500, RemoveDomElement);
This works beautifully in Firefox, Safari, Opera and Chrome, but - of course - not in IE. IE will execute the code and finish the cleanup, but the actual fade-out animation isn't shown.
What can I do for IE?
Share Improve this question edited Sep 20, 2018 at 7:11 fabrik 14.4k8 gold badges57 silver badges71 bronze badges asked Feb 18, 2009 at 20:19 Kenny SmithKenny Smith1 Answer
Reset to default 10Fade out (and remove) the child cells (TD) instead of the row.
Do this:
$(tr).children().css("background-color", "rgb(255,200,200)");
$(tr).children().fadeOut(500, RemoveDomElement);
Even though each of the TDs is doing it's own thing, this will work quickly enough to the human eye to be the same as just fading/removing the TR.
I'm using JQuery to fade-out rows (TR) when the user clicks a Delete button on a row (TR). By fade-out, I mean the entire row (TR) background-color is changed to an off red and then it fades to white and disappears. This is a great little animation for showing the user an instant reaction for what the did.
The JavaScript looks like this:
$(tr).css("background-color", "rgb(255,200,200)");
$(tr).fadeOut(500, RemoveDomElement);
This works beautifully in Firefox, Safari, Opera and Chrome, but - of course - not in IE. IE will execute the code and finish the cleanup, but the actual fade-out animation isn't shown.
What can I do for IE?
I'm using JQuery to fade-out rows (TR) when the user clicks a Delete button on a row (TR). By fade-out, I mean the entire row (TR) background-color is changed to an off red and then it fades to white and disappears. This is a great little animation for showing the user an instant reaction for what the did.
The JavaScript looks like this:
$(tr).css("background-color", "rgb(255,200,200)");
$(tr).fadeOut(500, RemoveDomElement);
This works beautifully in Firefox, Safari, Opera and Chrome, but - of course - not in IE. IE will execute the code and finish the cleanup, but the actual fade-out animation isn't shown.
What can I do for IE?
Share Improve this question edited Sep 20, 2018 at 7:11 fabrik 14.4k8 gold badges57 silver badges71 bronze badges asked Feb 18, 2009 at 20:19 Kenny SmithKenny Smith1 Answer
Reset to default 10Fade out (and remove) the child cells (TD) instead of the row.
Do this:
$(tr).children().css("background-color", "rgb(255,200,200)");
$(tr).children().fadeOut(500, RemoveDomElement);
Even though each of the TDs is doing it's own thing, this will work quickly enough to the human eye to be the same as just fading/removing the TR.
本文标签: javascriptHow can I fadeout a row (TR) in IE6 or 7Stack Overflow
版权声明:本文标题:javascript - How can I fade-out a row (TR) in IE6 or 7 - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745509886a2153778.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论