YAHOO.util.Dom has a batch function that has the following signature:
Any | Array package (el, method, o, override)
If el is a DOM element or an array of DOM elements, a method is a function that will pass each element in the array as the first argument, o is an optional second argument, and an override is a boolean that determines if the area should be a window (false) or o (true)
, :
function setDisplay(el, display) {
el.style.display = display;
}
YAHOO.util.Dom.batch(document.getElementsByTagName('div'), setDisplay, 'none');
, .