1

This was all working before and all the sudden it stopped working and I can't seem to figure out if I've done something wrong. All I need is the left, right arrows and helper buttons to show when fancybox is open. Any help is much appreciated.

ps. all files are there because it used to work just fine I just created a new page and it stopped working.

    <!-- Add jQuery library -->
<script type="text/javascript" src="js/jquery-1.7.min.js"></script>

<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="js/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css" media="screen" />

<!-- Add Button helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox-buttons.css?v=2.0.3" />
<script type="text/javascript" src="js/jquery.fancybox-buttons.js?v=2.0.3"></script>

<!-- Add Thumbnail helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox-thumbs.css?v=2.0.3" />
<script type="text/javascript" src="js/jquery.fancybox-thumbs.js?v=2.0.3"></script>
<script>
    /* <![CDATA[ */

    $(document).ready(function() {
        $(".fancybox-buttons").fancybox({
        prevEffect      : 'none',
        nextEffect      : 'none',
        closeBtn        : false,
        helpers     : { 
            title   : { type : 'inside' },
            buttons : {}
        }
    });
    });
    /* ]]> */
    </script>


<ul>
    <li><a class="fancybox-buttons" href="img/pic1.jpg" title="my title"><img src="img/pic1.jpg" alt="" class="thumb"  /></a></li>
    <li><a class="fancybox-buttons" href="img/pic2.jpg" title="another title."><img src="img/Sociales/2008/pic2.jpg" alt="" class="thumb" /></a></li>
</ul>
Andres
  • 2,013
  • 6
  • 42
  • 67
  • check the paths so maybe this `css/jquery.fancybox-buttons.css` should be `css/helpers/jquery.fancybox-buttons.css`. View the source code from your browser and click on the links of fancybox files to check that you get the files from the path you specified. – JFK Mar 30 '12 at 20:45
  • all paths are ok, that was the first thing i looked at. If you remember you helped me with this before when I was trying to get child/parent pages to show fancybox..well they asked me to do away with the iframes so everything is the same i just copied things in child to the parent but i dont get why it doesn't work now. – Andres Mar 30 '12 at 20:58
  • yea sure here you go http://iminds.pe/winter/test.html – Andres Mar 30 '12 at 21:15

1 Answers1

2

Thanks for sharing the link.

The fancybox buttons (as well as the normal navigation arrows) will show up only if you have set a gallery of elements. Neither the navigation arrows or the buttons will be displayed when fancybox opens single element.

In order to set a gallery, two or more elements have to share the same rel attribute, or the same data-fancybox-group attribute. The links in your demo file have none of those.

Your script is correct, just set to your images any of the attributes described above like

<a class="fancybox-buttons" rel="gallery" href="{target}"...etc
JFK
  • 40,963
  • 31
  • 133
  • 306
  • man you are really a life saver! i don't understand why I didn't need it before but thanks alot, works like a charm. – Andres Mar 31 '12 at 16:16