Functions.php in Child Theme – load JS

I also working on ait theme template,

If you want to add new css & js file into child theme so u first create function.php file in child theme directory & after that u can write following code…

<?php 

define('CHILD_THEME_DIR', get_bloginfo(stylesheet_directory));
 /* this is my child theme css  folder */
define('CHILD_THEME_CSS_DIR', CHILD_THEME_DIR . '/assets/css'); 
/* this is my child theme js folder */
define('CHILD_THEME_JS_URL', CHILD_THEME_DIR . '/assets/js');
define('CHILD_THEME_LIB_DIR', CHILD_THEME_DIR . '/libraries');
define('CHILD_THEME_IMG_URL', CHILD_THEME_DIR . '/assets/img');
define('CHILD_THEME_FONTS_DIR', CHILD_THEME_DIR . '/assets/fonts');

function mychildScriptsAndStyles()
{
    $css = CHILD_THEME_CSS_DIR;
    $jj = CHILD_THEME_JS_URL;
    $lib = CHILD_THEME_LIB_DIR;

aitAddStyles(array(
        'bootstrap-min'     => array('file' => "$css/bootstrap.min.css"),
        'chosen-min'        => array('file' => "$lib/chosen/chosen.min.css"),
        'pictopro-outline'  => array('file' => "$lib/pictopro-outline/pictopro-outline.css"),
        'pictopro-normal'   => array('file' => "$lib/pictopro-normal/pictopro-normal.css"),
        'colorbox'          => array('file' => "$lib/colorbox/colorbox.css"),

        'carat-css'         => array('file' => "$css/carat.css"),
    ));

    aitAddScripts(array(
        'jquery'            => array('file' => "$jj/jquery.js"),
        'jquery-ui'         => array('file' => "$jj/jquery.ui.js"),
        'jquery-migrate'    => array('file' => "code.jquery.com/jquery-migrate-1.2.1.js", 'deps' => array('jquery')),
        'bootstrap'         => array('file' => "$jj/bootstrap.js"),
        'cycle'             => array('file' => "$jj/cycle.js"),
        'carat'             => array('file' => "$jj/carat.js"),
        'ezmark'            => array('file' => "$lib/ezMark/js/jquery.ezmark.js"),
        'jquery-slider'     => array('file' => "$lib/jslider/bin/jquery.slider.min.js"),
        'colorbox'          => array('file' => "$lib/colorbox/jquery.colorbox-min.js"),
        'chosen'            => array('file' => "$lib/chosen/chosen.jquery.js"),
        'easytabs'          => array('file' => "$lib/easy-tabs/lib/jquery.easytabs.min.js"),
    ));


}

add_action('wp_enqueue_scripts', 'mychildScriptsAndStyles');

Add this in function.php. Hope It will be helpful…!!

tech