jQuery(window).on('load', function () {
if (typeof elementorFrontend !== 'undefined' &&
elementorFrontend.hooks &&
elementorFrontend.modules &&
elementorFrontend.modules.animatedHeadline) {
// Run on initial load
jQuery('.elementor-widget-animated-headline').each(function () {
elementorFrontend.modules.animatedHeadline(jQuery(this));
});
// Also run when Elementor finishes rendering widgets
elementorFrontend.hooks.addAction('frontend/element_ready/animated-headline.default', function ($scope) {
elementorFrontend.modules.animatedHeadline($scope);
});
}
});