Hello, I was wondering if there are any DomReady event functions and onclick functions. I was doing some reading and found that onclick sometimes does not work in different browsers and can cause bubbling. I would go to a framework (preferably Mootools), but Im trying to avoid it.
I would rather have some function that runs the function when the dom is ready. As Im sure all of us are sick of putting window.onload = function() etc... The onclick I can see being harder to find, but the DOM Ready Event has to exist out there without using a framework, right?
myReady is a function you define, perhaps in code that's loaded from the <head> tag. In place of a normal .ready() call, you name a function, any function, myReady. when the document is ready, myReady() will be fired.
Code:
function myReady(){
alert("tags are ready, but images might still be loading");
}
Bookmarks