jQuery wrap without refresh

孤人 提交于 2019-12-12 08:35:41

问题


I need to wrap an iFrame in a div wihtout the iFrame reloading the content. Is there a way to suppress the refresh or another way to wrap the content?


回答1:


wrap does a wrapAll function, in which jQuery clones the <iframe/>, and this causes the refresh in Firefox.

update: I think it is a bug with the iframe handling code in the browsers, because the following code is not working either:

var
  $i = $('iframe[src^="http://www.site.com"]'),
  $d = $('<div class="test"/>');

$d.append($i);


来源:https://stackoverflow.com/questions/4397270/jquery-wrap-without-refresh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!