Nevermind.. i use getElementsByClassName ..
somehow $$ does not accept variables.
For the record, here is how it works for me:
document.getElementsByClassName(postContentClass).each(
function(element) {
Element.toggle(element);
}
);
Thanks for reading anyways.
Best regards,
Kjell
On 7/15/06, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
Hi.. i am trying something very simple, but somehow...
var postContentClass = "postcontent"; // classname
$$(postContentClass).each(
Element.toggle();
);
Now in my HTML i have 10 time <div class="postcontent"> but $$ does not find anything. why?
I already put an alert() into the each() but the alert only occurs 1 time. :(
Any ideas?
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs