Quran.ayah.prev( surah, ayah )

Gets the previous surah & ayah number from given surah & ayah number


Quran.ayah.prev( surah, ayah )

Surah number need to be added here

Ayah number need to be added here

Returns: object - example: {surah: 1, ayah: 2}


Examples:

Example: previous surah & ayah number

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

</div>
<script>
$('#demo').append('Previous Surah & Ayah for  1:7 is '+Quran.ayah.prev(1, 7).surah+':'+Quran.ayah.prev(1, 7).ayah);
</script>
</body>
</html>

Demo:

Comments


blog comments powered by Disqus

.