Pekka's answer is correct, but you may need other information, for example. what it's called, for example, if we have this:
$(document).ready(function() {
alert("DOM Ready!");
});
Then put it in a named function, for example:
function myFunc() {
alert("DOM Ready!");
}
Now you can call it using myFunc()anywhere ... if you still want to call it on document.ready, the syntax is very short, for example:
$(myFunc);
$(document).ready(myFunc);
, function() { }, , , .ready(myFunc) $("#thing").click(myFunc), :)