It's probably applying them, but you haven't defined them in your
styles. addClassName('active') will turn your link into <a href="foo"
class="active" ...> but I suspect you are trying to set the :active
"pseudoclass" instead, which browsers have built into their
stylesheets and which you can further modify by creating a style like
a:active { something here }.
If you look at your page in Firefox with the Firebug extension active,
you'll see that your code is working. But it's applying the class, not
setting the pseudoclass.
Also, one more pet peeve -- the numeric ids on your a tags. These are
a strict no-no in HTML. An ID may only begin with an alphabetical
character (maybe some punctuation is allowed, but keep it simple and
stick to a-z). You can use a_1, a_2, a_3 as your ids if you need the
number as a key for something else, and just strip it off with
a.getAttribute('href').gsub(/a_/,'').
Walter
On Jan 12, 2009, at 12:11 PM, zeitmeister wrote:
> I suppose it doesn't manage to attach the correct "active"-tags to the
> DIVs and Links ...
> maybe, I didn't deload them correctly?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---