Commit 807b3926 authored by fred's avatar fred

construct on air string so that it can be checked against old value

.html() will only give the contents of the first array element, therefore the
whole string has to be enclosed in a single <span> to avoid fade in and out
everytime onair value is checked.
parent c06014fc
......@@ -208,11 +208,11 @@ $(function() {
} else if (onair.data.nonstop) {
onairContainer = $('<span>' + onair.data.nonstop.title + '</span>');
if (onair.data.track_title) {
onairContainer = onairContainer.add('<span> - </span>');
onairContainer = onairContainer.add($('<span class="nonstop-track-title">' + onair.data.track_title + '</span>'));
$('<span> - </span>').appendTo(onairContainer);
$('<span class="nonstop-track-title">' + onair.data.track_title + '</span>').appendTo(onairContainer);
if (onair.data.track_artist) {
onairContainer = onairContainer.add('<span> </span>');
onairContainer = onairContainer.add($('<span class="nonstop-track-artist">(' + onair.data.track_artist + ')</span>'));
$('<span> </span>').appendTo(onairContainer)
$('<span class="nonstop-track-artist">(' + onair.data.track_artist + ')</span>').appendTo(onairContainer);
}
}
}
......
Markdown is supported
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