Unable to produce dynamic list
Hello,
I'm trying generate listview programmatically which i'm unable to do,
Here is the code..
- $.ajax({
- type: "GET",
- url: 'updateService.php?time=lifetime',
- success: function(resp){
- $('#li-nav').empty()
-
- var movie='Prasad';
-
- $('#li-nav').append('<li>' +
- '<a href="">' +
- '<h3>' + movie + '</h3>' +
- '</a>' +
- '</li>');
- },
- error: function(e){
- alert('Error: ' + e);
- },
- complete: function() {
- $('#li-nav').listview();
- }
- });
- <div data-role="content">
- <ul data-role="listview" data-inset="true" data-theme="c" id="li-nav">
-
-
- </ul>
- </div>
Output: