# blockenberg/2.0.7/blocks/flip-card/frontend.js

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

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

```javascript
/* Flip Card — frontend.js
   Handles click-to-flip and keyboard (Enter/Space) for click-trigger cards. */
(function () {
    document.querySelectorAll('.bkbg-fc-outer[data-flip-trigger="click"]').forEach(function (card) {
        card.addEventListener('click', function () {
            var flipped = card.getAttribute('data-flipped') === 'true';
            card.setAttribute('data-flipped', flipped ? 'false' : 'true');
        });
        card.addEventListener('keydown', function (e) {
            if (e.key === 'Enter' || e.key === ' ') {
                e.preventDefault();
                card.click();
            }
        });
    });
})();

```
