Quran.surah.number( name [, nameType] )

Gets the surah number of the surah from a surah name


Quran.surah.number( name [, nameType] )

Name name of the surah

nameType There are 3 types of names arabic_name, english_name or english_meaning. default value is arabic_name


Examples:

Example: Get surah number from the surah name

<!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>
Quran.init(); // initial start run - required
$('#demo').append('Surah arabic "الفاتحة" number is  '+Quran.surah.number('الفاتحة', 'arabic_name'))
.append('<br />');
$('#demo').append('Surah english "Al-Baqara" number is  '+Quran.surah.number('Al-Baqara', 'english_name'))
.append('<br />');
$('#demo').append('Surah meaning "Mankind" number is  '+Quran.surah.number('Mankind', 'english_meaning'))
.append('<br />');
</script>
</body>
</html>

Demo:

Comments


blog comments powered by Disqus

.