Look the analysis I've made...
| 1 | 2
pagebeforecreate | 494 / 1125 | 257 / 257
pagecreate | 1125 / 1125 | 257 / 485
pageinit | 1125 / 1125 | 257 / 485
pagebeforeshow | 1125 | 485
This table can be read considering this code...
$(document).on("pageinit",function(){
alert("pageinit" + $("#unica").html().length);
});
$(document).on("pagebeforecreate",function(){
alert("pagebeforecreate" + $("#unica").html().length);
});
$(document).on("pagecreate",function(){
alert("pagecreate" + $("#unica").html().length);
});
$(document).on("pagebeforeshow",function(){
alert("pagecreate" + $("#unica").html().length);
});
In every event I try to verify which is the length of the html markup. In the first page I have a listview and the other one is a simple page. Every page has a button to go to every page. The first value in case of the first page considering the pagebeforecreate is 494; but it turn out to be 1125 when you go from page 2 to page 1. It's like the framework keeps in the dom the enhance markup.
Another thing... Consider this...
1. "pagebeforecreate": Before jqm does the "enhance" work (widget auto-initialization,etc);es decir, putting the css classess in the markup. I can manipulate the attributes via JS or modify them, etc..
"pagecreate": Not all the widgets have had an opportunity to enhance the contained markup. This should be use only to create it's own widgets !.
"pageinit": Similar to dom .ready. After auto-init ocurs.
What do you think or what landmark can you make ?...
Thankx