初始页面加载后如何运行所有elementor构建器脚本?

时间:2019-10-08 17:17:43

标签: loading builder elementor domcontentloaded

elementor页面构建器脚本未随swup.js(ajax页面加载系统)一起加载

document.addEventListener(“DOMContentLoaded”, () => {

// I want to load all elementor page builder script here!!

});

参考网址 https://swup.js.org/getting-started/reloading-javascript

谢谢

1 个答案:

答案 0 :(得分:0)

我认为这是您想要的:

elementorFrontend.hooks.addAction( 'init', function() {
 // Do something that is based on the elementorFrontend object.
} );

来源:https://code.elementor.com/js-hooks/