我的网页包含来自一些随机站点的一些 RSS 提要。
这些提要中的链接可将您带到这些网站。无论如何将这些网页加载到我页面上的 div 中?
我遇到的问题是这些 RSS 链接是在我创建 RSS 提要时动态创建的。
有人有什么建议吗?
function showLTab(key)
{
var myObject = science[key];
var stage = $("#leftFeed").children('#tabContent');
//forming the query
//LIMT controls amount of tabs displayed in each feed
var query = "select * from feed where url='"+myObject.feed+"' LIMIT 5";
//changing URL to YQL
var url = "http://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent(query)+"&format=json&callback=?";
$.getJSON(url,function(data){
//removes any previous feeds
stage.empty();
//item exists in RSS
$.each(data.query.results.item || data.query.results.entry,function(){
stage.append(myObject['function'](this));
})
});
$("#leftFeed").children('#activeTab').text(key);
}
function showLeftDropDown()
{
var activeTab = $("#leftFeed").children('#activeTab');
//creating drop down div
var dropDown = $('<div>').addClass('dropDownList').css({'top': 10, 'width': activeTab.width()}).hide().appendTo('#leftFeed');
$.each(science,function(i){
// populates dropdown div
if(i==activeTab.text()) return true;
$('<div>').text(i).appendTo(dropDown);
})
dropDown.slideDown('fast');
}