Forums

annoying flash when page loads with jquery (1 post)

  1. wplearner
    Member
    Posted 6 months ago #

    Hey so basically I get this annoying little flash right before jquery "kicks in." I have it loaded from the standard wordpress install, and in functions.php I have:

    <?php
     function my_init() {
    	if (!is_admin()) {
    
    		wp_enqueue_script('jquery');
    	 wp_enqueue_script("trial",get_bloginfo('stylesheet_directory')."/trial.js", array('jquery'));
    
    }
    }
    add_action('init', 'my_init'); ?>

    Anyone know how to fix this?

Reply

You must log in to post.

About this Topic