I changePage to a page containing the code below, however the on_load function does not get called. However, when I replace the call to on_load() with alert(“HELLO”); this does get called. Why oh why?
<div data-role="page" id="index">
HI
<script type="text/javascript">
$("#index").live('pageinit', function() {
on_load();
});
</script>
I think the event you have to “listen” for is when the page shows and not when it initiates,
http://jquerymobile.com/test/docs/api/events.html