Skip to content

Instantly share code, notes, and snippets.

@kayalshri
Created April 3, 2014 08:50
Show Gist options
  • Save kayalshri/9950808 to your computer and use it in GitHub Desktop.
Save kayalshri/9950808 to your computer and use it in GitHub Desktop.
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