By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Unofficial Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!
elementor official

Enqueued Java Script not working

ceylonthemes

ceylonthemes

New Member
custom widget .js enqueued and working on localhost. But, It is not working on server ? Latest elementor free version used.

code in theme functions.php file

if ( in_array( 'elementor/elementor.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

add_action('elementor/editor/before_enqueue_scripts', function() {
wp_register_script( 'my-custom-widgets', get_theme_file_uri('/my.js') , array( 'jquery' ),'', true );
wp_enqueue_script( 'my-custom-widgets' );

});

}
 
elementor official

Latest posts

Other Elementor Resources

elementor official
elementor official
Top