• Okay , I am confused, ther are so many methods and I can’t seem to find a right explanation ..

    In functions.php I have the following..

    wp_register_script( 'info-caroufredsel', get_template_directory_uri() . '/js/jquery.carouFredSel-5.5.0-packed.js', array('jquery'), '5.5.0', true );
      wp_register_script( 'info-carousel-instance', get_template_directory_uri() . '/js/info-carousel-instance.js', array('info-caroufredsel'), '1.0', true );
    
      wp_register_script( 'jquery.flexslider', get_template_directory_uri().'/js/jquery.flexslider-min.js', array('jquery'), '1.7', true );
      wp_register_script( 'home-page-main-flex-slider', get_template_directory_uri().'/js/home-page-main-flex-slider.js', array('jquery.flexslider'), '1.0', true );
    
      wp_enqueue_script( 'info-carousel-instance' );
        wp_enqueue_script('home-page-main-flex-slider');

    So two scripts are getting enqueued and two are not.

    the question is

    How do I call the two scripts that are not getting engueued in my theme?

    I don’t want the scripts always loading on every page if they arent’ being used? you know what i mean?

    I’ve seen so many techniques for javascript It is confusing … there doesn’t seem to be a standard way to do it

    I’ve seen people add it in their headers etc etc.

    [Please continue in your existing thread if you have more questions – http://wordpress.org/support/topic/javascript-the-proper-way?replies=2%5D

The topic ‘how to Include javascript??????’ is closed to new replies.