Good day to all. I can't get here to nicely put the data from the js function in the View sheet. I am trying to output using jQuery Mobile Alpha 3 , trying to output this code like this:

Js code

var $taskli = $('<li><a href="\">Task Name ' + task.id + ": " + task.time + "</a></li>").appendTo($("#tasks")); var $taskul = $("<ul/>").appendTo($taskli); 

html code

 <ul id="tasks" data-role="listview" data-theme="g"></ul> 

Displays not as in the example on the jQuery website, but as a regular list, without the possibility of clicking. How can I deduce from the code so it would normally show? alt text

but I want this:

alt text

    1 answer 1

    Js

      var taskli = '<li><a href="\">Task Name ' + task.id + ": " + task.time + "</a></li>"; $('#tasks').append(taskli).listview('refresh'); 

    HTML

     <ul id="tasks" data-role="listview"></ul>