Search code examples
htmlprototypejs

Hide all divs having a certain class using Prototype?


How can I hide all divs having the class myclass using Prototype? I guess something like $$('myclass') and foreach?

Thanks!


Solution

  • $$("div.myclass").each(Element.hide);