I'm new to jquery Mobile (I'm familiar with jquery though) and I cannot find an event that runs after the page is shown. I'm using jStorage to store some data and I want on load to check if there is any data and if there is to show something different in the page (like add elements to a list).
But the $(document).ready does not work if I change the page (meaning the hash changes).
EDIT: I've already tried the pageshow event
$('div').live('pageshow',function(event, ui){
alert('TEST');
});
But it happens before the content is put in the HTML.
From the jQuery Mobile documentation (which is always a good place to start):
pagebeforeshow
Triggered on the page being shown, before its transition begins.
pagebeforehide
Triggered on the page being hidden, before its transition begins.
pageshow
Triggered on the page being shown, after its transition completes.
pagehide
Triggered on the page being hidden, after its transition completes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With