See http://derekslager.com/blog/posts/2010/06/google-closure-introduction.ashx, Comparison #4,
Hide all div
's:
<html>
<head>
<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js" type="text/javascript"></script>
<script language="JavaScript">
goog.require('goog.dom.query');
goog.require('goog.style');
</script>
<script>
function HideElement(selector) {
goog.array.map(goog.dom.query(selector, null), function(e) {
goog.style.showElement(e, false);
});
}
</script>
</head>
<body>
<div>div</div>
<p>paragraph</p>
<div>another div</div>
<input type="button" value="hide" onclick="HideElement('div');"/>
</body>
</html>
Can't help you with the user-friendly breakdown, though.