I suspect, according to the XML output:
Code:
function getCurrentTrack() {
$.get('/player/readerPlayer.php', function (data) {
$tracks = $(data).find('track');
$tracks.each(function (){
$this = $(this);
var title = $this.find('title').text();
var listenersn = $this.find('listeners').text();
$('.now_playing a').html(title).attr('href', url);
$('.listeners span').html(listenersn);
setTimeout(getCurrentTrack, 65000);
});
}, 'xml');
};
Where does
url come from..? Presumably you need to extract it from
location.
Code:
function getCurrentTrack() {
$.get('/player/readerPlayer.php', function (data) {
$tracks = $(data).find('track');
$tracks.each(function (){
$this = $(this);
var title = $this.find('title').text();
var listenersn = $this.find('listeners').text();
var locn = $this.find('location').text();
$('.now_playing a').html(title).attr('href', locn);
$('.listeners span').html(listenersn);
setTimeout(getCurrentTrack, 65000);
});
}, 'xml');
};
But you need to escape the ampersand & and other characters in the XML as it is not valid otherwise:
Quote:
& &
' '
" "
< <
> >
|