Does $.mobile.loadPage provide a callback function?

ajax, jquery, jquery-mobile

Solution

You can also use "done" after the loadPage. This method will be called once a page has been loaded..

 $.mobile.loadPage("page2.html", true).done(function (e, ui, page) {
      //page has been loaded
}).fail(function () {
        alert("sorry, no dice");
    });

Thanks

Problem

If I wanted to load content that into a jquery mobile page that required its own jquery script, for example a slideshow plug-in, how would I load the slideshow html page "and" the slideshow jquery file into $.mobile.loadPage? Is there a callback function? Thanks

Original source