Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery wrap without refresh

Tags:

jquery

refresh

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?

like image 516
Alexis Avatar asked Dec 09 '10 10:12

Alexis


1 Answers

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);
like image 57
KARASZI István Avatar answered Oct 14 '22 11:10

KARASZI István