I want to replace the contents within a html element so I\'m using the following function for that:
function ReplaceContentInContainer(id,content) {
var c
Of course, all modern browsers now support the following simpler way:
var elements = document.getElementsByClassName('someClass');
but be warned it doesn't work with IE8 or before. See http://caniuse.com/getelementsbyclassname
Also, not all browsers will return a pure NodeList
like they're supposed to.
You're probably still better off using your favorite cross-browser library.