Har denna koden, men får inte rätt på den. Vet inte riktigt vad felet är.
Kod:
<script type="text/javascript">
$(window).load(function() {
function getstats() {
// Attempt to get stats for "Demo Channel" channel
$.getJSON('http://www.musikmixen.se/stationer/?c=MusikMixen-Dansband&callback=?', function(response) {
if ( response == null || response.artist == null ) alert('Something went wrong!');
$('.trackinfo').html(response.artist + ' - ' + response.title + '<br>\
<img width="120" height="120" class="thumbnail" src="http://www.musikmixen.se/stationer/' + response.image + '">');
// Note: Image returned from the player is in this style: tmp/cache/meghan.trainor.png
});
}
getstats(); // First-time load
setInterval(getstats, 10000); // Reload information every 10 sec
});
</script>
<span class="trackinfo"></span>
Tacksam för hjälp!