# blockenberg/2.0.7/blocks/tech-stack/frontend.js

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

- Page: https://pluginprobe.com/plugins/blockenberg/2.0.7/code/blocks/tech-stack/frontend.js
- Raw: https://pluginprobe.com/plugins/blockenberg/2.0.7/raw/blocks/tech-stack/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/tech-stack/frontend.js#L10-L20`.

```javascript
wp.domReady(function () {
    document.querySelectorAll('.bkbg-ts-wrapper').forEach(function (wrapper) {
        /* ── Color-on-hover: grayscale toggle ─────────────────────────────── */
        if (wrapper.classList.contains('bkbg-ts-color-on-hover')) {
            wrapper.querySelectorAll('.bkbg-ts-item img').forEach(function (img) {
                var parent = img.closest('.bkbg-ts-item');
                parent.addEventListener('mouseenter', function () { img.style.filter = 'none'; });
                parent.addEventListener('mouseleave', function () { img.style.filter = 'grayscale(100%)'; });
            });
        }

        /* ── Animate on scroll ──────────────────────────────────────────────── */
        var items = wrapper.querySelectorAll('.bkbg-ts-item.bkbg-ts-anim');
        if (!items.length) return;

        var io = new IntersectionObserver(function (entries) {
            entries.forEach(function (entry, idx) {
                if (entry.isIntersecting) {
                    setTimeout(function () {
                        entry.target.classList.add('bkbg-ts-visible');
                    }, idx * 60);
                    io.unobserve(entry.target);
                }
            });
        }, { threshold: 0.1 });

        items.forEach(function (item) { io.observe(item); });
    });
});

```
