Standards, most comprehensive tutorials and compatibility lists.
IE does not support hasAttribute method
It just doesn't... it turns out that hasAttribute is a DOM Level 2 method, which IE is blissfully unaware of. The solution is to check the getAttribute for null value.
Toggling the visibility of an element
This can be done by changing either the display or the visibility property of an element.
I am not sure if I would ever need to use this technique, but these examples look really nice, and they are cross-browser.