Reputation: 781
I am trying to use loadPage with jquery mobile and the function doesn't seem to return data to the desired page container.
My javasript is like so
$('.numMobi a').live("click", function() {
var dataurl = $(this).attr("data-url");
if (dataurl != null)
$.mobile.loadPage("lib/loadMobis.php",{
pageContainer:$("#MobiDirSites"),
data:dataurl,
transition: "slideup"
});
});
I get the databack in firebug but it is not inserting it in the page.
Here is my html
<div data-role="page" id="MobiDir">
<div data-role="header" class="header" role="banner">
</div>
<div data-role="content" id="MobiDirSites">
</div>
<div data-role="footer">
</div>
</div>
Any ides why it isn't inserting it?
Upvotes: 0
Views: 8855
Reputation: 1857
In my test, your code successfully fetched the URL and loaded it into #MobiDirSites
. I suspect this is what you want, since you're specifying a target element on the existing page. What I think Phill is picking up on is the fact that you specified a transition
in your loadPage()
call. transition
only applies to changePage()
.
Upvotes: 2