0
我想加载框架中的链接时,我徘徊他们,但不工作。如果我在页面上创建的任何链接都使用此函数,但是当我在动态创建时使用它时不起作用。使用jquery动态创建内容
这是页面
$('#user-tweets').append('<table class="tweets" width="320" border="0"><tr><td rowspan="1">' +
user + '</td><td rowspan="1">' +
date + '</td></tr><tr><td width="45"><a href="' +
profile_img + '"><img src="' +
profile_img + '" width="55" height="50"/></a></td><td width="186">' +
text + '<p><a href="' + url + '"target="_blank">' +
url + '</a></p></td></tr></table><hr>'
);
上创建...和我使用这个函数打开链接到帧当我徘徊的数据。
$("a").hover(
function() {
$(this).append($("<iframe src='"+this.href+"'></iframe>"));
},
function() {
$(this).find("iframe:last").remove();
}
);