Fabcybox 1.3.4 - Thumbnail title on hover

2019-07-29 07:11发布

Hi I am trying to add a title to the thumnails of my image gallery using Fancybox 1.3.4 but I am unsure of how to do this. Here is my code so far.

<script>
    !window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
</script>

<script type="text/javascript" src="scripts/jquery.fancybox-1.3.4/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
    <script type="text/javascript" src="scripts/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="scripts/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<script type="text/javascript">
        $(document).ready(function() {


                $("a[rel=example_group]").fancybox({
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'titlePosition'     : 'over',
                'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
                    return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
                }
            });

        });
    </script>

<div id="content">
<div id="content_wrapper">
<a rel="example_group" href="images/gallery/big/winter_big.jpg" title="Winter - Personal"><img id="thumb" alt="" src="images/gallery/thumbs/winter_small.jpg" /></a>

This is an example of how I have coded one image and thumbnail from the gallery

0条回答
登录 后发表回答