Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
Fix issue with lazy loading iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
iamfredric committed Jul 5, 2019
1 parent e894147 commit 828ea82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Providers/InstantiatorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function optimize()

// Apply lazy load script to footer
add_action('wp_footer', function () {
echo '<script>window.lazyLoadOptions = {elements_selector: ".lazy,.content img", callback_reveal: function (e) {if (e.dataset.style) {e.style.cssText = e.dataset.style;}}};</script><script async src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lazyload.min.js"></script>';
echo '<script>window.lazyLoadOptions = {elements_selector: ".lazy,.content img,.content iframe", callback_reveal: function (e) {if (e.dataset.style) {e.style.cssText = e.dataset.style;}}};</script><script async src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lazyload.min.js"></script>';
});
}
}

0 comments on commit 828ea82

Please sign in to comment.