This is not a real coding question, more of a real-world statement.
I have previously noted that DOMReady
events are slow, very slow. So, I noticed while br
tag makes it pointless to use jQuery's ready()
. Just put native JS-wrapper function call that contains calls of all other functions that should be called on document ready.
In general, it's a working (though somewhat littering HTML code and therefore unacceptable for perfectionists) alternative for situations when author does not need/want to use jQuery at all. In such situations though, I would prefer to use native DOMContentLoaded
event handler that is supported by most of browsers including IE9+ (for IE8- we can use window.load()
as an acceptable fallback).