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 / job-listing / frontend.js

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

40 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* Job Listing — frontend */
2 (function () {
3 'use strict';
4
5 function init() {
6 document.querySelectorAll('.bkjl-wrap').forEach(function (wrap) {
7 if (wrap._bkjlInit) { return; }
8 wrap._bkjlInit = true;
9
10 /* Secondary button hover — mirror primary button colour */
11 var applyBtn = wrap.querySelector('.bkjl-btn-apply');
12 var secBtn = wrap.querySelector('.bkjl-btn-secondary');
13
14 if (applyBtn && secBtn) {
15 var primaryBg = applyBtn.style.background || applyBtn.style.backgroundColor || '#6c3fb5';
16 var primaryText = applyBtn.style.color || '#ffffff';
17
18 var origBg = secBtn.style.background || secBtn.style.backgroundColor || '';
19 var origColor = secBtn.style.color || '';
20
21 secBtn.addEventListener('mouseenter', function () {
22 secBtn.style.background = primaryBg;
23 secBtn.style.color = primaryText;
24 });
25
26 secBtn.addEventListener('mouseleave', function () {
27 secBtn.style.background = origBg;
28 secBtn.style.color = origColor;
29 });
30 }
31 });
32 }
33
34 if (document.readyState === 'loading') {
35 document.addEventListener('DOMContentLoaded', init);
36 } else {
37 init();
38 }
39 }());
40