Reputation: 193
How to show a page loading spinner in html page inside page content like if i move to another page,the loading spinner will show in page content using jquerymobile
Upvotes: 1
Views: 1230
Reputation: 34107
Here you go demo : http://jsfiddle.net/DfFxp/ OR this: http://jsfiddle.net/5r7Q7/
Jquery code
(
function(a,b,c){setInterval(function(){for(b=0;b<8;c||(a.innerHTML+='<b><i>•'),a.childNodes[b].className='b'+b+' o'+(++b-~c)%8);c=-~c},99)}
)(document.getElementById('spinner'));
HTML
<body>
<div id="spinner"></div>
</body>
PS - this might help as well but again you can put this in between the page load and the page this gets trigger from : http://jsfiddle.net/N7Z9e/95/ I reckon rest you know more about your app anyways :),
Upvotes: 1