Simple plugin test
-
I’m trying to add a very simple add-on to my Elementor (not for distribution).
So I add a plugin with the code:
/** * Plugin Name: Test plugin * Description: test elementor add-on plugin. * Version: 1.0 * Author: Me */ function my_enqueue() { wp_enqueue_script('jquery'); wp_enqueue_script( 'my_custom_script', get_stylesheet_directory_uri() . '/js/testscript.js' ); } add_action( 'elementor/element/after_section_start', 'my_enqueue' );
And in that js file:
jQuery(document).ready(function($) { $('#elementor-panel').css('border','2px solid black'); // Work $('#elementor-panel-header').css('border','2px solid blue'); // No Work });
Now the first one works and the second one doesn’t.
I know it’s not the way to build a plugin for Elementor but i need a very simple light add-on for my self and i’m not a developer, so can you help me with that if there is a simple answer why the first one works and the second one doesn’t?
Thank you very much!
- The topic ‘Simple plugin test’ is closed to new replies.