Reputation: 14155
On master page I have
$(document).bind("pageinit", function () {
$.mobile.loading('hide');
});
and I'm rendering popup message like this
$.mobile.loading('show', { theme: "a", text: "My Text...", textonly: true, textVisible: true });
I just need to make this message disappear after 2seconds, right now it stays on top forever.
Upvotes: 0
Views: 566
Reputation: 11003
Just use a timeout to execute the code after whateveer interval you want,
for example
//display loading message
$.mobile.loading('show',
{ theme: "a", text: "My Text..."
, textonly: true, textVisible: true });
//execute code after 2 seconds
setTimeout(function () {
$.mobile.loading('hide');
},2000);
And here's a link to a jsbin
Upvotes: 1