Can I call the onload event from the document.ready of jQuery, like the below:
$(function() {
onloadfunc(param);
});
VS:
<body onload = "onloadfunc(param);">
Are the above two same?
How can I call onloadfunc(param); in JQuery on Load and not on DOM ready?
nop,
this :
is equivalent to
which is triggered before the onload event.
You can call
onloadwith jQuery like this :—
to answer your question, you can do something like this :
wich is not the best code i’ve ever written… 😀