So I cant get the js for a lightbox plugin to work correctly. The error I get is:
Uncaught TypeError: undefined is not a function bootstrap-lightbox.js?ver=4.1:113
My functions.php:
function bootstrap_js() {
wp_enqueue_script( 'bootstrapjs', get_stylesheet_directory_uri() . '/js/bootstrap.js', array('jquery'), '', true );
wp_enqueue_script( 'bootstraplightbox', get_stylesheet_directory_uri() . '/js/bootstrap-lightbox.js', array('jquery'), '', true );
}
add_action( 'wp_enqueue_scripts', 'bootstrap_js');
And then I have this in my header.php
<?php wp_enqueue_script( 'jquery' ) ?>
I can find out whats wrong. I have been googling for hours now and none of the fixes I have found has worked for me (or understood them might be another reason).
Aucun commentaire:
Enregistrer un commentaire