Closed FKasa closed 11 years ago
You need a semicolon after the function assignment.
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
};
}
}
//addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
addLoadEvent(function() {
document.getElementById("title").className = "current";
});