jQM - Dynamically Populate Listview from JSON

by Prasasto Adi

HTML

<script src="http://code.jquery.com/mobile/1.4.0-beta.1/jquery.mobile-1.4.0-beta.1.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0-beta.1/jquery.mobile-1.4.0-beta.1.min.css">
<link rel="stylesheet" href="http://example.gajotres.net/iscrollview/jquery.mobile.iscrollview.css">
<link rel="stylesheet" href="http://example.gajotres.net/iscrollview/jquery.mobile.iscrollview-pull.css">
<script src="http://example.gajotres.net/iscrollview/iscroll.js"></script>
<script src="http://example.gajotres.net/iscrollview/jquery.mobile.iscrollview.js"></script>
<div data-role="page" id="home">
    
</div>

JavaScript

var url = 'http://ip.jsontest.com/';        
    $.ajax({
        url: url,
        dataType: "jsonp",
        async: false,
        success: function (result) {
            alert('success');
        },
        error: function (request,error) {
            alert(error);
        }
    });