# blockenberg/2.0.7/blocks/image-collage/frontend.js

Blockenberg — 600+ Advanced Gutenberg Blocks &amp; AI Agent for WordPress Block Editor, version 2.0.7. 26 lines.

- Page: https://pluginprobe.com/plugins/blockenberg/2.0.7/code/blocks/image-collage/frontend.js
- Raw: https://pluginprobe.com/plugins/blockenberg/2.0.7/raw/blocks/image-collage/frontend.js
- Modified: 2026-03-06T12:32:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/blockenberg/2.0.7/code/blocks/image-collage/frontend.js#L10-L20`.

```javascript
(function () {
    'use strict';

    function initCollage() {
        var collages = document.querySelectorAll('.bkbg-image-collage[data-animate-in="1"]');
        if (!collages.length) return;

        var io = new IntersectionObserver(function (entries) {
            entries.forEach(function (entry) {
                if (entry.isIntersecting) {
                    entry.target.classList.add('bkbg-ic--visible');
                    io.unobserve(entry.target);
                }
            });
        }, { threshold: 0.15 });

        collages.forEach(function (collage) { io.observe(collage); });
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initCollage);
    } else {
        initCollage();
    }
}());

```
