Fancybox gallery not firing
Permalink
Hello all, I have been trying to implement a fancybox gallery into my website for the past few days now, but it is deciding not to fire.
Here is the code I added to the main header.
The image I am testing it on is as follows.
The fancybox requires the rel attribute to call the image into an array. I have not changed much beyond that. I'm not sure if it is just a syntax error on my part or what, but I definately need a fresh pair of eyes on this. Any help would be greatly appreciated.
Here is the code I added to the main header.
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('gallery.css')?>" /> <script type='text/javascript' src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type='text/javascript' src="./themes/HSI/mousewheel.js"></script> <script type='text/javascript' src="./themes/HSI/pack.js"></script> <script type='text/javascript'> $("a [rel='Shadow']").fancybox({ titlePosition : 'over', titleFormat : function(title, currentArray, currentIndex, currentOpts) { return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>'; } }); </script> <?php Loader::element('header_required'); ?>
The image I am testing it on is as follows.
<div class="gallerycontainer"> <ul class="mainGallery"> <li><a rel="Shadow" title="Test" href="Path_to_image"><img src="Path_to_image" alt="" /></a></li> </ul> </div>
The fancybox requires the rel attribute to call the image into an array. I have not changed much beyond that. I'm not sure if it is just a syntax error on my part or what, but I definately need a fresh pair of eyes on this. Any help would be greatly appreciated.