I want to make something like library in JS. If table has a class="aClass" I want to automatically modify some of it's elements using JS.
I tried this way:
window.onLoad = LoadSetup();
function LoadSetup()
{
tables = document.getElementsByTagName("table");
alert(tables.length); // it's 0 though there are is one in the document
}
But i seems that this function runs before loading html. How to fix this?