Re: hide is not a function

Brian Williams
2007-10-16T15:35:15Z

from the quick looking i just did i think you want to do something along the
lines of

$$("#splash-description .buy").invoke(''hide'');

or maybe

$$("#splash-description .buy").each(Element.hide)

because the $$:

Takes an arbitrary number of CSS selectors (strings) and returns a
document-order array of extended DOM elements that match any of them.

thus you need to iterate through all of them even if there is only one to
iterate through.



i could be completely out in left field on this, so i look forward to
someone confirming this one way or the other.




On 10/16/07, STHayden <alt255-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
>
> I''m using  FF2 + prototype 1.5.1
>
> this small line is giving me a problem:   $$("#splash-
> description .buy").hide();
>
> Firebug says this:
> $$("#splash-description .buy").hide is not a function
>
>
>
> if I use a single $ the the hide() function seems to work...
>
> why is this function now working for the double $$?
>
>
> Stefan
>
>
> >
>