editor.css
2 years ago
editor.js
2 years ago
elementor-editor-preview.js
1 year ago
elementor-preview-styling.js
3 weeks ago
elementor-editor-preview.js
42 lines
| 1 | ( function () { |
| 2 | window.addEventListener( 'elementor/frontend/init', function () { |
| 3 | // Listen for elementor frontend init event |
| 4 | if ( |
| 5 | typeof elementorFrontend !== 'undefined' && |
| 6 | elementorFrontend.hooks |
| 7 | ) { |
| 8 | const checkAndloadPageBreak = function () { |
| 9 | if ( |
| 10 | typeof srfmElementorData !== 'undefined' && |
| 11 | srfmElementorData.isProActive && |
| 12 | typeof srfmLoadPageBreak === 'function' |
| 13 | ) { |
| 14 | srfmLoadPageBreak(); |
| 15 | } |
| 16 | |
| 17 | // initial phone field |
| 18 | if ( typeof srfmInitializePhoneField === 'function' ) { |
| 19 | srfmInitializePhoneField(); |
| 20 | } |
| 21 | |
| 22 | // initial dropdown field |
| 23 | if ( typeof srfmInitializeDropdown === 'function' ) { |
| 24 | // call the hook after 2 seconds to make sure the dropdown is initialized properly without any issues. |
| 25 | setTimeout( function () { |
| 26 | srfmInitializeDropdown(); |
| 27 | }, 2000 ); |
| 28 | } |
| 29 | }; |
| 30 | |
| 31 | elementorFrontend.hooks.addAction( |
| 32 | 'frontend/element_ready/sureforms_form.default', |
| 33 | checkAndloadPageBreak |
| 34 | ); |
| 35 | elementorFrontend.hooks.addAction( |
| 36 | 'frontend/element_ready/shortcode.default', |
| 37 | checkAndloadPageBreak |
| 38 | ); |
| 39 | } |
| 40 | } ); |
| 41 | }() ); |
| 42 |