One simple solution could be:
function show_error_message(message, delay) {
$.mobile.loading('show',
{ theme: "e", text: (message || 'ERROR'),
textonly: true, textVisible: true });
setTimeout(function() {
$.mobile.loading('hide');
}, ((delay && delay > 0) ? delay : 1000));
}
Using:
show_error_message("Wow!!!", 1500);
The message Wow!!!will be displayed in the center of the window.
source
share