| 1 |
/** |
| 2 |
* Compatible with Page Builder. |
| 3 |
* |
| 4 |
* @author nhamdv |
| 5 |
*/ |
| 6 |
|
| 7 |
LP.Hook.addAction( 'lp-compatible-builder', () => { |
| 8 |
LP.Hook.removeAction( 'lp-compatible-builder' ); |
| 9 |
|
| 10 |
if ( typeof elementorFrontend !== 'undefined' ) { |
| 11 |
[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => { |
| 12 |
Waypoint.refreshAll(); |
| 13 |
window.dispatchEvent( new Event( 'resize' ) ); |
| 14 |
} ); |
| 15 |
} |
| 16 |
|
| 17 |
if ( typeof vc_js !== 'undefined' && typeof VcWaypoint !== 'undefined' ) { |
| 18 |
[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => { |
| 19 |
VcWaypoint.refreshAll(); |
| 20 |
} ); |
| 21 |
} |
| 22 |
} ); |
| 23 |
|
| 24 |
LP.Hook.addAction( 'lp-quiz-compatible-builder', () => { |
| 25 |
LP.Hook.removeAction( 'lp-quiz-compatible-builder' ); |
| 26 |
|
| 27 |
LP.Hook.doAction( 'lp-compatible-builder' ); |
| 28 |
|
| 29 |
if ( typeof elementorFrontend !== 'undefined' ) { |
| 30 |
return window.elementorFrontend.init(); |
| 31 |
} |
| 32 |
|
| 33 |
if ( typeof vc_js !== 'undefined' ) { |
| 34 |
if ( typeof vc_round_charts !== 'undefined' ) { |
| 35 |
vc_round_charts(); |
| 36 |
} |
| 37 |
|
| 38 |
if ( typeof vc_pieChart !== 'undefined' ) { |
| 39 |
vc_pieChart(); |
| 40 |
} |
| 41 |
if ( typeof vc_line_charts !== 'undefined' ) { |
| 42 |
vc_line_charts(); |
| 43 |
} |
| 44 |
|
| 45 |
return window.vc_js(); |
| 46 |
} |
| 47 |
} ); |
| 48 |
|
| 49 |
LP.Hook.addAction( 'lp-question-compatible-builder', () => { |
| 50 |
LP.Hook.removeAction( 'lp-question-compatible-builder' ); |
| 51 |
LP.Hook.removeAction( 'lp-quiz-compatible-builder' ); |
| 52 |
LP.Hook.doAction( 'lp-compatible-builder' ); |
| 53 |
|
| 54 |
if ( typeof elementorFrontend !== 'undefined' ) { |
| 55 |
return window.elementorFrontend.init(); |
| 56 |
} |
| 57 |
|
| 58 |
if ( typeof vc_js !== 'undefined' ) { |
| 59 |
if ( typeof vc_round_charts !== 'undefined' ) { |
| 60 |
vc_round_charts(); |
| 61 |
} |
| 62 |
|
| 63 |
if ( typeof vc_pieChart !== 'undefined' ) { |
| 64 |
vc_pieChart(); |
| 65 |
} |
| 66 |
if ( typeof vc_line_charts !== 'undefined' ) { |
| 67 |
vc_line_charts(); |
| 68 |
} |
| 69 |
|
| 70 |
return window.vc_js(); |
| 71 |
} |
| 72 |
} ); |
| 73 |
|