Run a function after pagecontainer change
I'm wanting to run a function after a pagecontainer change to populate my page from a DB. I'm looking for the same functionality as .ready() in jQuery.
I've seen both load and show, but I can't get either to work. I've used the following code:
- function goToHome(){
- $(':mobile-pagecontainer').pagecontainer('change', 'index.html', {
- show: alert('test'),
- transition: 'slide',
- changeHash: true,
- reverse: false,
- showLoadMsg: true,
- reload: false
- });
- }
But my alert is firing before page has loaded, I get the same thing with load too.
What am I doing wrong?
Thanks in advance.