Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8897649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:24:03+00:00 2026-06-15T00:24:03+00:00

I have put together a simple webapp with jquery mobile. When the user visits

  • 0

I have put together a simple webapp with jquery mobile. When the user visits the main page they will be confronted with a list of buttons that they can click on to determine where to go.

The buttons are generated from an ajax call to a php script which makes a call to a database to figure out what options are available.

There are several pages, and each page makes its own ajax call when on pageshow. Each button is a link with data-role="button" so they look nice.

However a problem I am facing is that in between page changes, there is a slight delay that causes the buttons to go ugly before the page changes.

This is more evident on a slow (or busy) computer. If it takes a long time to set-up the page (perhaps there is lots of data returned from the DB) the delay will also occur and the buttons go ugly.

What might be the cause of this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:24:04+00:00Added an answer on June 15, 2026 at 12:24 am

    There are (at least) three approaches to handle that:

    • Add the content before showing the page: by tying the addition of the dynamic content to the event pagecreate that is triggered before the enhancing of the page by jquery mobile. Obviously, if your calls are asynchronous, you may not have had the chance to retrieve and insert your dynamic content before the page is enhanced.
    • Hide the elements before they are shown: it is how I do it (at list with jqm lists, haven’t had to do it with buttons). I create my elements with a css class that boils down to display:none;, and remove this class after I have manually called the enhancement
    • Enhance the buttons one after the other: in order not to have to wait for the whole elements to have been inserted before they start looking nice, you could call .button() on each individual element just after you insert it (if you insert them in the DOM one after the other). You might still get a slight “blink” from ugly to nice for each element, but that should be barely noticeable if at all.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to do a simple web app with jquery mobile. I have put together
I have a simple page put together and it works great in IE, and
I have a simple accordion menu I've put together today using the jQuery slideDown()
I put together a simple example: I have a list of thumbnails and I
I have put together an image scroller using jquery, like this function rotateImages(whichHolder, start)
I'm new to Jquery and I was able to put together a simple toggle
I have put together a simple ASP.NET MVC 3 test web app that uses
I'm completely new to databases, and have put something simple together using the helpful
I'm attempting to put together a simple jQuery product filter for a store that
I have put together this simple code for showing/hiding some content on click using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.