Complete Quran

Get's the complete quran with one request. useful for offline mode.

Url: http://api.globalquran.com/complete/quranID?key=api_key&format=json

attribute Value Description
quranID quran id list of quran id seperated by | (pipe)
key api key your site / app api key here


Url Examples By:


Examples:

Example:  Complete load the simple quran and display only 10 verses from it.

<!DOCTYPE html>
<html>
<head>
  <style>#demo-1{ color:lightBlue; }</style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
  <div id="demo-1">

</div>
<script>
$.ajaxSetup({ cache: true, jsonpCallback: 'quranData' }); // define ajax setup
$.getJSON("http://api.globalquran.com/complete/quran-simple?key=api_key&jsoncallback=?", {
    format : "jsonp"
}, function(data)
{    
    $.each(data.quran, function(i, by)
    {
	$.each(by, function (verseNo, line) {
            $("<p>").html(line.surah+':'+line.ayah+' '+line.verse).appendTo("#demo-1");
            if (verseNo == 10)
                return false;
	});
    });
});
</script>
</body>
</html>

Demo:

Comments


blog comments powered by Disqus

.