Instantly share code, notes, and snippets.

Embed
What would you like to do?
Thirukural with Meanings read from JSON
<script type="text/javaScript">
$(document).ready(function(){
$.getJSON("http://getthirukural.appspot.com/api/2.0/kural/<?php echo $start;?>-<?php echo $end;?>?appid=m8gzum7bzuank&format=json&jsoncallback=?", function(data){
var result="";
$.each(data.KuralSet.Kural, function(i,Kural){
result += "#"+Kural.Number+"<br>"+Kural.Line1+"<br>"+Kural.Line2+"<br><span class='label-warning'> "+Kural.Translation+"</span><br><BR>";
});
$('#ptable').html(result);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment