charlie
charlie

Reputation: 481

Wordpress child theme template not working with external jquery/javascript functions

I have created a template in my wordpress child theme and included a link to Bootstrap v3.0.3 .js file which is also hosted on my site.

the popup modal is working fine, however the jquery tabs are not.

They will display (using bootstrap.css) however, when navigating through the tabs they are not changing

i have pasted the full code from the page here: http://pastebin.com/JdikDe0W

Upvotes: 0

Views: 221

Answers (1)

Vcasso
Vcasso

Reputation: 1348

Can you try loading files like this?

function theme_enqueue_styles() {
    wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
    wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
}
add_action('wp_enqueue_scripts', 'theme_enqueue_styles');

function wpdocs_theme_name_scripts() {
    wp_enqueue_style( 'style-name', get_stylesheet_uri() );
    wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/vanja-script.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

Place these inside your functions.php in the Appearance section. Here is the screenshot: http://screencast.com/t/Krzc1wf7Y Then just place the files into the appropriate folders.

Upvotes: 1

Related Questions