Reputation: 10482
<div id="order-preview" data-role="page">
// header
//ui-content
//footer
<script>
$("#order-preview").on("pageload",function(event){
alert("aas");
});
$(document).on("pageload","#order-preview",function(event){
alert("aas");
});
</script>
</div>
I load this page as below
<a data-icon="shop" href="#order-preview">Click</a>
None of the two event is firing when #order-preview
page is loaded
Upvotes: 0
Views: 372
Reputation: 1068
You can try with pageshow event, this way works for me:
$(document).on("pageshow","#order-preview",function(event){
alert("aas");
});
I hope that this helps you!
Upvotes: 1