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 / flip-card / frontend.js

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

17 lines 653 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* Flip Card — frontend.js
2 Handles click-to-flip and keyboard (Enter/Space) for click-trigger cards. */
3 (function () {
4 document.querySelectorAll('.bkbg-fc-outer[data-flip-trigger="click"]').forEach(function (card) {
5 card.addEventListener('click', function () {
6 var flipped = card.getAttribute('data-flipped') === 'true';
7 card.setAttribute('data-flipped', flipped ? 'false' : 'true');
8 });
9 card.addEventListener('keydown', function (e) {
10 if (e.key === 'Enter' || e.key === ' ') {
11 e.preventDefault();
12 card.click();
13 }
14 });
15 });
16 })();
17