What is the very first event fired by an HTML document?

html, javascript, jquery, jquery-mobile

Solution

What you're looking for is a comprehensive visualisation of the jQuery mobile event model lifecycle, this diagram below is available in Pro jQuery Mobile and on the author's blog:

Please remember that this is jQuery mobile specific. The list of native events is available as part of the W3 spec, and the only one relevant to the document lifecycle is good old `load`.

Problem

I'm curious which event is fired first when using jQuery and jQuery Mobile. Oddly enough, the first console output I get is `pagebeforecreate` then `document ready` and then `onload`. I would like to know if any other events are being fired before these ones. http://jsfiddle.net/yYGYe/2/ ``` $('html').bind('pagebeforecreate',function(event) { console.log("pagebeforecreate"); }); $(document).ready(function() { console.log("document ready"); }); window.onload = function(){ console.log("onload"); }; ```

Original source

Related problems