PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.7
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.7
2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / blocks / content-flip-box / frontend.js

frontend.js in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.7, at blocks/content-flip-box/frontend.js

25 lines 761 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* Content Flip Box — frontend.js
2 Handles click-trigger flip behaviour.
3 Hover-trigger blocks are handled entirely in CSS.
4 */
5 (function () {
6 'use strict';
7
8 function initFlipBoxes() {
9 document.querySelectorAll('.bkbg-cfb-grid[data-trigger="click"]').forEach(function (grid) {
10 grid.querySelectorAll('.bkbg-cfb-card').forEach(function (card) {
11 card.addEventListener('click', function () {
12 card.classList.toggle('is-flipped');
13 });
14 card.style.cursor = 'pointer';
15 });
16 });
17 }
18
19 if (document.readyState === 'loading') {
20 document.addEventListener('DOMContentLoaded', initFlipBoxes);
21 } else {
22 initFlipBoxes();
23 }
24 })();
25