Calling Colorbox from Bxslider
I am trying to wrap my head around how to call a colorbox slide group off a slide within bxslider. Using this cold I though it would work, and I does, but It is including the document window as the first slide in the colorbox and I don't know how to prevent this from happening. Any suggestions on what I might be doing wrong?
Within my bxslider document ready statement I call colorbox on the slide that I want to open the colorbox with using:
- $('.isSlideshow').colorbox({rel:'slideGroup1'});
Where .isSlideshow is the class on the bxslider slide a tag.
- <a class="isSlideshow cboxElement" href="#" >
- <img src="/media/slideshow-carousel.jpg" >
- </a>
And here is my document ready for the colorbox:
- $(document).ready(function() {
- var $gallery = $('a.slideGroup').colorbox({rel:'slideGroup1',@trans, @slideshow, slideshowSpeed: 4000, @showTitles });
-
- $("a#openGallery").click(function(e){
- e.preventDefault();
- $gallery.eq(0).click();
- });
The last portion being for opening any colorbox using a link instead of the first image in the colorbox.