ericm — 2008-09-15T18:49:45-04:00 — #1
I'm using the Scriptaculous fade() function to remove a table row. It works fine and just after I call a function that uses $$('tbody tr').each to iterate through each row in order to reset an alternating background.
What I've noticed is that the $$() iterates through even removed rows as if they're still there. Is this the typical behavior or is it a timing issue with when the fade() or remove() finishes? How do I avoid the counting of removed rows, as it's throwing off my alternating backgrounds.
richtestani — 2010-03-04T18:16:43-05:00 — #2
The Fade effect doesn't remove elements from the document but sets it its display value to none.
you'd want to use the Prototype method remove() to actually remove the elements.
if you are just hiding and showing, you potentially could set a className 'inactive' and check for that.