On Fri, Oct 2, 2009 at 8:11 PM, DBJDBJ <[email protected]> wrote:
>
> toggle() and TR do not go very well together ...
>
> http://jsbin.com/ipabi/edit
>
> This is the version using fadeIn/fadeOut
This suffers from the problem that you are using one global 'toggle'
variable for all rows. There are other ways to achieve this effect.
Here's a simple one that animates the opacity on show, but not on
hide:
http://jsbin.com/eduzi (code http://jsbin.com/eduzi/edit)
But if you need animations in both directions, then you need something
more robust. There has been recent discussion of whether toggle is
broken. (http://tinyurl.com/yag2orw), but for now, I don't think you
can do alternating animations on table rows using toggle.
Of course it's not hard to write your own function that maintains its
own state and alternates different animations based upon that state.
Implementation is left as an exercise for the reader. :-)
-- Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---