This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Feature Request: Would like to ability to change the loading message on the fly #1397
Closed
Description
I know you can set it as a default message with:
$.mobile.loadingMessage
But I wanted to display maybe a transition or status message and the ability to upload the message for longer load times.
Example:
if the loading message is displayed, set the text to (what ever message you want, but lets stick to LOADING), if Loading is displayed for more than 2 seconds, change the message to: STILL LOADING..., and if the message is still loading after 4 seconds display another message: OKAY THIS MIGHT TAKE A MINUTE...
The message and time intervals should be configurable
Activity
toddparker commentedon Apr 7, 2011
Hi - Can you please add this to the feature request page, link to this issue and close it. This may already be there so check first. That way, we can re-open when we're ready to tackle this.
https://github.com/jquery/jquery-mobile/wiki/Feature-Requests
All feature requests should be handled this way to we can keep the noise down in the tracker. Thanks!
surajkala commentedon May 17, 2011
Try this
phillpafford commentedon May 17, 2011
kinda works, but I wanted to display multiple messages if load times are long. For example: first message would be 'loading...' if loading takes longer than 2 seconds change the 'loading...' message to 'still loading...' if long than 5 seconds change the 'still loading...' message to 'you must be searching for a needle in a haystack...'
surajkala commentedon May 18, 2011
i dont know if this is the best way to do it.. but the below code shud get ur job done
<script type="text/javascript">
function updateloading()
{
$('.ui-loader h1').text('loading...');
setTimeout('$(".ui-loader h1").text("still loading...");', 500)
}
</script>
<a onclick="onclick="updateloading();" href="module.php">blog</a>
toddparker commentedon May 18, 2011
I think @surajkala's example is pretty simple and would work. We could add a way to set this value eventually, but this is pretty concise and easy to set with custom scripting like this. @phillpafford - could you please add this to the feature request wiki page and close this issue.
phillpafford commentedon May 18, 2011
Already added under core and has been closed. Thanks
jaspermdegroot commentedon Aug 7, 2012
This will be possible in 1.2 with the new loader widget.