(Wordpress 3.5.1)
Hi, in functions.php I've included following:
function add_lightbox_cys() {
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'fancybox', get_template_directory_uri() . '/inc/lightbox/js/jquery.fancybox.pack.js', array( 'jquery' ), false, true );
wp_enqueue_script( 'lightbox', get_template_directory_uri() . '/inc/lightbox/js/jquery.lightbox.js', array('fancybox'), false, true );
wp_enqueue_script( 'lightbox-style', get_template_directory_uri() . '/inc/lightbox/css/jquery.fancybox.css' );
}
add_action( 'wp_enqueue_scripts', 'add_lightbox_cys');
and then created the lightbox.js with following code:
(function($) {
$(".fancybox").fancybox();
})(jQuery);
now in the wordpress theme twentytwelve which came with wordpress this actually works opening pictures in a fancybox.
But when I try this in my own custom made theme it does not trigger the fancybox at all.
here the link to the site: http://goo.gl/y6qfb
can anybody help me?