Commit 6cb213a5 authored by Simon Daron's avatar Simon Daron
Browse files

Fixing bug with onAir (now working on player! )

parent 0b8f5ca2
......@@ -37,9 +37,12 @@
$('#WhatsOnAir').on('load',function(){
var self = $(this);
self.fadeOut();
$.getJSON('onair.json', function(data) {
if(data.episode || data.emission){
self.html('<strong>'+data.emission.title+'<strong>'+'&nbsp;<span>'+data.emission.title+'<span>');
$.getJSON('onair.json', function(onair) {
if(onair.data.episode || onair.data.emission){
var result = '';
result = result + ($.type(onair.data.emission) == 'object'?'<strong>'+onair.data.emission.title+'<strong>&nbsp;':'');
result = result + ($.type(onair.data.episode) == 'object'?'<span>'+onair.data.episode.title+'<span>':'');
self.html(result);
}
else{self.html('<strong>Unknown (Probably Non-Stop)<strong>');}
self.fadeIn();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment