0

I am very new to jQuery and I have a fancybox on my website. But when I open one of the images in the gallery, fancybox jumps up to the top of the page. My script looks like this:

<script type="text/javascript">
    $(document).ready(function() {
        $('.fancybox').fancybox({
         helpers:  {
                      title : { type : 'inside' }, 
                   }, //helpers
         beforeLoad: function() 
                   {
                      this.title = $(this.element).attr('caption');
                   }
         overlay : {
                      showEarly : false
                   } //overlay

        });
 });


</script>
Mehmet Ince
  • 3,625
  • 10
  • 40
  • 64
Infrantic
  • 1
  • 2
  • Potential duplicate of http://stackoverflow.com/questions/13547007/fancybox2-fancy-box-causes-page-to-to-jump-to-the-top – juju Nov 01 '13 at 13:37
  • Try first updating to the latest master that you can download form here https://github.com/fancyapps/fancyBox/archive/master.zip – JFK Nov 01 '13 at 16:19
  • I updated the master and it seems to have fixed the problems! Thank you so much! :) – Infrantic Nov 04 '13 at 18:21

1 Answers1

0

As JFK mentioned above, updating to the latest FancyBox Master fixed my issues.

Infrantic
  • 1
  • 2