Blogger JSON data, base url active class added

Monday, May 5, 2014

html code, no problem, but are not inserted into the active class. What's the error or problem ?



function dizilife(json) {
var link, title, skeleton = '',
content = json.feed.entry;
if (content !== undefined) {
skeleton = "<ol>";
for (var i = 0; i < content.length; i++) {
title = content[i].title.$t;
for (var j = 0; j < content[i].link.length; j++) {
if (content[i].link[j].rel == "alternate") {
link = content[i].link[j].href;
break;
}
}
skeleton += '<li><a href="' + link + '">' + title + '</a></li>';
}
skeleton += '</ol>';
$('#result').html(skeleton);
$('#result li a').each(function(){
var loc = window.location.href;
if(this.href === loc){
$(this).text(this.href);
}
});
} else {
$('#result').html('<span>No result!</span>');
}
}


/Get Script/ $.getScript("http://ift.tt/1mwZKSW");







http://ift.tt/1o0NJJ8