Menampilkan Data JSONP 4shared menggunakan Jquery Get Json


Percobaan menggunakan Jquery Get Json :

<div id="result"></div>

<script>
var url='https://api.4shared.com/v0/files.jsonp?oauth_consumer_key=YourConsumerKey&query=gnr&category=1&limit=2';
$(document).ready(function() {
jQuery.getJSON(url+"&callback=?", function(data) {
      $.each(data.files, function(i, item){
        $('#result').append(item.id+'<br/>'+item.name+'<br/><br/>');
      });
});
});
</script>


Smoga bermanfaat....!
Previous
Next Post »