about.js
2 weeks ago
admin-notifications.js
2 weeks ago
builders-preview-handler.js
2 weeks ago
callout.js
2 weeks ago
cff-admin-scripts.js
2 weeks ago
divi-handler.min.js
2 weeks ago
extensions.js
2 weeks ago
oembeds.js
2 weeks ago
settings.js
2 weeks ago
smash-usage-session.js
2 weeks ago
support.js
2 weeks ago
vue.min.js
2 weeks ago
builders-preview-handler.js
32 lines
| 1 | function docReady(fn) { |
| 2 | // see if DOM is already available |
| 3 | if ( |
| 4 | document.readyState === "complete" || |
| 5 | document.readyState === "interactive" |
| 6 | ) { |
| 7 | // call on next available tick |
| 8 | setTimeout(fn, 1); |
| 9 | } else { |
| 10 | document.addEventListener("DOMContentLoaded", fn); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | docReady(function () { |
| 15 | |
| 16 | document.body.addEventListener("click", function (event) { |
| 17 | // Check if the clicked element has the specific class |
| 18 | if ( |
| 19 | event.target && |
| 20 | ( event.target.classList.contains("sb-elementor-cta-link") ) |
| 21 | ) { |
| 22 | const href = event.target.getAttribute("href"); |
| 23 | window.open(href, "_blank"); |
| 24 | } |
| 25 | |
| 26 | |
| 27 | }); |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | }); |