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 7625509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:12:05+00:00 2026-05-31T05:12:05+00:00

I have a Phonegap/jQuery application which is working great, however in one area the

  • 0

I have a Phonegap/jQuery application which is working great, however in one area the DOM is being changed and not displayed until some user input (a touch, drag, anything) triggers the display to re-render. (This happens on my android phone and tablet, but works in Chrome)

function reloadSubscriptions(num) {
    if (subscriptionsStore[num]) {
        for (var x in subscriptionsStore[num]) {
            $('#' + x + 'Subscribe').html('<a href="#" onclick="unsubscribe(\'' + x + '\',\'' + num + '\'); return false;">[UN-SUBSCRIBE]</a>');
        }
    }
    $('#busy').hide();  
}

This is the final function in a chain, which does the DOM updates… Any ideas how I can trigger the application to refresh the display?

I’d be willing to provide the APK and a larger script chunk for demonstration.

I’ve since gotten this to occur elsewhere, basically any time I update the DOM without changing a lot of the display.

Edit:

The original HTML page includes:

<div id="wrapper">
    <ul id="menuList" class="menu-list"></ul>
    <div id="otherContent"></div>
</div>

When a certain button is pressed, a list of options is loaded into the #menuList. When they are loaded, a span #<item-id>Subscribe is created inside each <li>. After the list is loaded, the original function I posted conditionally updates the span #<item-id>Subscribe.

The display changes when the list of options is loaded, but not when the spans are updated after the fact. Touching the screen then shows the update.

  • 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-05-31T05:12:06+00:00Added an answer on May 31, 2026 at 5:12 am

    I tried following script code in my application which worked without any issue. Although this is just a test code so there is no additionally code running aside.

    <body>
        <div id="wrapper">
            <ul id="menuList" class="menu-list"></ul>
            <div id="otherContent"></div>
        </div>
    </body>
    
    <script type="text/javascript">
        function reloadSubscriptions(num) {
    
            // Tried with comments enabled as well
            //for (i = 0; i < num; i += 1) {
            $('#' + i + 'Subscribe').html(
                    '<a href="#" onclick="unsubscribe(\'' + i + '\',\'' + i
                            + '\'); return false;">[UN-SUBSCRIBE]</a>');
            //}
    
            $('#busy').hide();
        }
    
        function loadList(num) {
            for (i = 0; i < num; i += 1) {
                $("<li>List text <span id='"+ i+"Subscribe'></span></li>")
                        .appendTo($("#menuList"));
    
                reloadSubscriptions(i);
            }
        }
    
        loadList(5);
        // reloadSubscriptions(5);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Created a phonegap application using jQuery Mobile. Everything is working great for the most
I have an application which uses phonegap and jquery mobile and it has tabs
I am making the phonegap android application in html,javascript and jquery.I have made the
I am developing a PhoneGap application with JQuery mobile which requires geolocation data. Currently
I am developing an Application with jQuery Mobile and Phonegap. I want to have
I have a perfectly functioning phonegap application running on droid devices. However, when I
I have an application that is using jquery, jquerymobile and spine.js running on phonegap
I am developing a mobile application using phonegap and jquery mobile. I have this
I have an application built with Phonegap and JQuery Mobile. Whenever the soft keyboard
We are currently working on the finishing touches of an application which uses Phonegap

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.