Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter JibsouX

    (@jibsoux)

    Sorry i found a way ^^

    jquery-core
    jquery-migrate

    set $in_footer to true

    thanks for the plugin

    ————————————

    by the way you can put your script in footer to improve loading like this :

    LINE 159 > 169 IN INDEX.PHP

    if( $options['debug'] && current_user_can( 'manage_options' ) || !$options['debug'] ){
    	//jQuery Cookie
    	wp_deregister_script( 'jquery-cookie' );
    	wp_register_script( 'jquery-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array( 'jquery' ),SPM_PLUGIN_VERSION<strong>, true</strong>);
    	wp_enqueue_script( 'jquery-cookie' );
    
    	//Simple Popup Manager Javascript
    	wp_deregister_script( 'simple-popup-manager' );
    	wp_register_script( 'simple-popup-manager', plugins_url('js/simple-popup-manager.js', __FILE__), array( 'jquery', 'jquery-cookie' ),SPM_PLUGIN_VERSION<strong>, true</strong>);
    	wp_enqueue_script( 'simple-popup-manager' );
    Thread Starter JibsouX

    (@jibsoux)

    oops the <strong> balise don’t work in a code cote :p

    there is the wat to put the script in footer :

    if( $options['debug'] && current_user_can( 'manage_options' ) || !$options['debug'] ){
    	//jQuery Cookie
    	wp_deregister_script( 'jquery-cookie' );
    	wp_register_script( 'jquery-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array( 'jquery' ),SPM_PLUGIN_VERSION, true);
    	wp_enqueue_script( 'jquery-cookie' );
    
    	//Simple Popup Manager Javascript
    	wp_deregister_script( 'simple-popup-manager' );
    	wp_register_script( 'simple-popup-manager', plugins_url('js/simple-popup-manager.js', __FILE__), array( 'jquery', 'jquery-cookie' ),SPM_PLUGIN_VERSION, true);
    	wp_enqueue_script( 'simple-popup-manager' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘put script in footer ???’ is closed to new replies.