Hi!
I’m trying to make your plugin work with Rocket Loader + Elementor + Jet
With this functions.php:
function add_cfasync_attribute( $tag, $handle ) {
// add script handles to the array below
$scripts_cfasync = array(
'jquery-core',
'page-scroll-to-id-plugin-script',
);
foreach ( $scripts_cfasync as $cfasync_script ) {
if ( $cfasync_script === $handle ) {
return str_replace( ' src', ' data-cfasync="false" src', $tag );
}
}
return $tag;
}
add_filter( 'script_loader_tag', 'add_cfasync_attribute', 10, 2 );
I choose which scripts will be ignored by Rocket Loader;
But it didn’t work 100% yet, this error is appearing in the console:
https://i.postimg.cc/PqthHgLq/image.png
Before this Snippet, the page loaded normally, but the Elementor Popups didn’t work, and no errors appeared in the console. I put this Snippet and the popups started working again, only the error appeared. Can we adjust how?