How to add querySelectorAll() function to Element for IE <= 7?
With the code from this article I've successfully added querySelectorAll to document in IE7. But I need to use it on an element rather than document , like this: var containers = document.querySelectorAll('.container'); // Works for (var i=0; i<=containers.length; i++) { var container = containers[i]; container.querySelectorAll('a[data-type="people"]'); // Fails // ... } Is there a way to add querySelectorAll to elements in IE7 rather than only to document ? Very interesting question. I would lean toward using a library for this, like jQuery , one of the ones mentioned below, Closure , or any