I have a stand alone html notepad which I need to run the following code.
jQuery(function($)
{
$
.getJSON(
'http://muslimsalat.com/daily.json?key=562736259fca2971c0f7b4cc838f1ecf',
function(times)
{
$('.prayerTimesExample')
.append('Today in ' + times.title)
.append(' Fajr: ' + times.items[0].fajr)
.append(' Dhuhr: ' + times.items[0].dhuhr)
.append(' Asr: ' + times.items[0].asr)
.append(' Maghrib: ' + times.items[0].maghrib)
.append(' Isha: ' + times.items[0].isha)
.append(
' by <a href="http://MuslimSalat.com">MuslimSalat.com</a>');
});
});'
So I made a the following html code but when i run it nothing happens
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="prayerTimesExample"></div>
<script>
jQuery(function($)
{
$
.getJSON(
'http://muslimsalat.com/daily.json?key=562736259fca2971c0f7b4cc838f1ecf',
function(times)
{
$('.prayerTimesExample')
.append('Today in ' + times.title)
.append(' Fajr: ' + times.items[0].fajr)
.append(' Dhuhr: ' + times.items[0].dhuhr)
.append(' Asr: ' + times.items[0].asr)
.append(' Maghrib: ' + times.items[0].maghrib)
.append(' Isha: ' + times.items[0].isha)
.append(
' by <a href="http://MuslimSalat.com">MuslimSalat.com</a>');
});
});
</script>
</body>
</html>
Here is the jfiddle i made http://jsfiddle.net/axL0u0q6/ Thank you Hope Im clear