0

I am trying to make the list. it doesn't appear when I open this page. the list appears after I refresh the opened page Script to :

$(document).ready(function()
{

    var url="/appSample/getgroups.php";
    $.getJSON(url,function(result){
        console.log(result);
        $.each(result, function(i, field){
            var groupId=field.groupId;
            var groupName=field.groupName;
            var createdON=field.createdON;

            $("#listview").append("<a class='item' href='triplist.html'><h3>"+ groupName + " </h3><p>"+ createdON +"</p></a>");

        });
        $('#listview').listview('refresh');
    });
});

HTML:

<ul class="list" id="listview"></ul>
ImR
  • 3
  • 5

1 Answers1

0

Did you try using

$(window).bind("load", function()

instead of:

$(document).ready(function() ?

TechShaman
  • 7
  • 1
  • 3