Improve the selector for lazy loading images (fix #313)
When `page.dynamic_title` is set to false, the image will not be loaded
This commit is contained in:
parent
e84331b26a
commit
3f2d400f16
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const imgs = document.querySelectorAll('.post-content img');
|
const imgs = document.querySelectorAll('#main > div.row:first-child > div:first-child img');
|
||||||
const observer = lozad(imgs);
|
const observer = lozad(imgs);
|
||||||
observer.observe();
|
observer.observe();
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue