Skip to content

Commit f8a5b7d

Browse files
authored
Merge pull request ressio#126 from darius-heavy/patch-1
Avoid back button problem with Iframes in Firefox
2 parents d8e620b + 8657e91 commit f8a5b7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jquery.lazyloadxt.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@
215215
src = $isFunction(srcAttr) ? srcAttr($el) : el.getAttribute(srcAttr);
216216

217217
if (src) {
218-
el.src = src;
218+
if ( el.tagName === 'IFRAME' )
219+
el.contentWindow.location.replace( src );
220+
else
221+
el.src = src;
219222
}
220223

221224
removeNode = true;

0 commit comments

Comments
 (0)