Skip to content
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
@phillpafford

Description

@phillpafford

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

toddparker commented on Apr 7, 2011

@toddparker
Contributor

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

surajkala commented on May 17, 2011

@surajkala

Try this

        <a onclick="$('.ui-loader h1').text('my custom loading msg..');" href="module.php">News</a>
phillpafford

phillpafford commented on May 17, 2011

@phillpafford
Author

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

surajkala commented on May 18, 2011

@surajkala

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

toddparker commented on May 18, 2011

@toddparker
Contributor

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

phillpafford commented on May 18, 2011

@phillpafford
Author

Already added under core and has been closed. Thanks

jaspermdegroot

jaspermdegroot commented on Aug 7, 2012

@jaspermdegroot
Contributor

This will be possible in 1.2 with the new loader widget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @toddparker@surajkala@phillpafford@jaspermdegroot

        Issue actions

          Feature Request: Would like to ability to change the loading message on the fly · Issue #1397 · jquery-archive/jquery-mobile