Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery mobile does not execute the Script on the response of ajax request
    text
    copied!<p>I'm working on jQuery Mobile and currently stumbled upon a road block</p> <p>On render to "task" index page after successfully creating the "Task"(I accordance with rails App) the index page compromise of <code>ul#listview</code> with count bubble some thing of this is <a href="http://jquerymobile.com/demos/1.0/docs/lists/lists-count.html" rel="nofollow">kind</a> . On the beneath the page there is the script to to get the count as seen in the bubble example (mention above) but it seem that script never execute.</p> <p>Here is the Code:</p> <p><strong>partials => _index.html.erb</strong></p> <pre><code>&lt;div data-role="page" id="task"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Tasks&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;ul data-role="listview"&gt; &lt;li&gt; &lt;a href="/mytasks"&gt; My Task &lt;span class="ui-li-count" id="my_tasks" &gt;&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="/alltasks"&gt; All Task &lt;span class="ui-li-count" id="all_tasks" &gt;&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $("#task").live("pageinit",function() { alert("Update the count"); // The below method fetched the count go_fetch_the_count("mytasks","all_tasks"); }) &lt;/script&gt; &lt;/div&gt; </code></pre> <p>I have also tried:</p> <pre><code>$(document).ready(function() { // above function // }) , $("#task").live("pagecreate",function(){ // above function // }) $("#task").live("pageshow",function(){ // above function // }) $("#task").live("pagebeforecreate",function(){ // above function // }) </code></pre> <p>But it seem not even the alert is also not executed.</p> <p>Regards Viren Negi </p>
 

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