asp.net mvc - JqueryMobile page initialization function -
i using master page on jquery-mobile app have few controller , , want set javascript call initialize function on every page when loads through ajax,
iam sure there few ways that, whats best approach , alternative $(document).ready when page called through ajax instead of being directly loaded without that.
$('div').live('pageshow',function(event, ui){ alert('this page hidden: '+ ui.prevpage); });
or
$(document).bind("pageshow".function(){ // initialize code here });
Comments
Post a Comment