You'll need to send a function as argument to each and (like others said) use a dot
$$(".postContentClass").each(function(element) { Element.toggle(element); }); or call it without paranthes so it's passed as a reference and executed in the each loop and not executed directly. $$(".postContentClass").each(Element.toggle); Martin 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
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs