Klaus Hartl schrieb:
> Jörn Zaefferer schrieb:
>>> Been playing with jQuery, and I've come across a problem when I try to
>>> fade or slide table cells. In IE it seems to work OK but in Firefox, as
>>> the effect starts, all the cells stack one under the other, then the
>>> effect executes. Looks very odd.
>>>
>>> How can I make it work consistently in both browsers? Had a quick search
>>> of the list but I couldn't find a post about this.
>> That is on the list of the "hard problems". As far as I know it hasn't been
>> solved yet. That doesn't help you much, but perhaps you should just avoid
>> the animations on the table cells.
>
> The problem is that the animate function sets the display property to
> "block", that's way the cells stack.
>
> For now you could try to reset the correct property in a callback:
>
> $('td').fadeIn('normal', function() {
> this.style.display = 'table-cell';
> });
>
> Or more generic:
>
> $('tr').fadeIn('normal', function() {
> var display = {tr: 'table-row', td: 'table-cell'};
> var tagName = this.tagName.toLowerCase();
> if (tagName == 'tr' || tagName == 'td')
> this.style.display = display[tagName];
> });
Er, no, that already happens before the animation starts... forget it.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/