I am trying to show page loading spinner using below code in jquery mobile 1.3 Android native app, but it is not working, can any one help me what the issue is and how to make it work
</head>
<body>
<div id="createPage" data-role="page">
<script>
$("#createPage").on("pageshow", function(event, ui) {
$mobile.loading('show');
processCreateBtnAction(); //This takes 5 seconds to complete the operation
$.mobile.loading('hide');
});
</script>
<div data-role="header" data-position="fixed"></div>