Note that there are some explanatory texts on larger screens.

plurals
  1. POPhonegap dom update not immediately reflected in display
    primarykey
    data
    text
    <p>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)</p> <pre><code>function reloadSubscriptions(num) { if (subscriptionsStore[num]) { for (var x in subscriptionsStore[num]) { $('#' + x + 'Subscribe').html('&lt;a href="#" onclick="unsubscribe(\'' + x + '\',\'' + num + '\'); return false;"&gt;[UN-SUBSCRIBE]&lt;/a&gt;'); } } $('#busy').hide(); } </code></pre> <p>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?</p> <p>I'd be willing to provide the APK and a larger script chunk for demonstration.</p> <p>I've since gotten this to occur elsewhere, basically any time I update the DOM without changing a lot of the display.</p> <p>Edit:</p> <p>The original HTML page includes:</p> <pre><code>&lt;div id="wrapper"&gt; &lt;ul id="menuList" class="menu-list"&gt;&lt;/ul&gt; &lt;div id="otherContent"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>When a certain button is pressed, a list of options is loaded into the #menuList. When they are loaded, a span #<code>&lt;item-id&gt;</code>Subscribe is created inside each <code>&lt;li&gt;</code>. After the list is loaded, the original function I posted conditionally updates the span #<code>&lt;item-id&gt;</code>Subscribe. </p> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload