Hi celso,
effectivelly, you have the removeClassName which remove the given
class for an element, but what you could also do is having another
class (say 'notchecked') that correspond to original style, and you
want to revert the 'checked' just do $('tr-xxx').morph('notchecked');
Depending to
Thanks guys for your answers !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from
Hi Celso,
could you be more precise, because if you add className checked and
morph to class name checked, there is no animation !
--
david
On 4 juin, 16:26, Celso cels...@gmail.com wrote:
Hello !
I needed something like this:
$('tr').addClassName('checked');
My app uses zebra table. Each tr have a checkbox, when the
checkbox is checked, the morph effect is enabled
css:
.checked {font-weight: bold; background:#fb5126; color:#fff;}
zebra:
tr id=tr-577 class=
/tr
tr id=tr-587 class=fundo
/tr
tr id=tr-592 class=
with a checked:
tr id=tr-577
Aha. Well, $('tr') returns one element that has the ID of 'tr', it
does not return a collection of elements with that tag name.
$$('tr') will return a collection of extended elements with the tag
name TR. If you want to be more specific (maybe you use tables for
something else on the same