Adding onload to body
And here’s a jQuery solution (as Mike suggested in his first comment). function add_my_scripts() { wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘my_init_script’, SCRIPTSRC, ‘jquery’, ‘1.0’ ); } add_action( ‘init’, ‘add_my_scripts’ ); Then add a script to your plug-in that does this: jQuery.noConflict(); jQuery(document).ready(function($) { init(); }); This will start jQuery in no conflict mode (if it isn’t … Read more