how to hyperlink title of an images in fancybox

65 views
Skip to first unread message

Bheesham Kumar Sharma

unread,
Apr 25, 2012, 9:07:42 AM4/25/12
to fanc...@googlegroups.com
i want to make hyperlink title of an image in fancybox.

i work on gallery feature.when someone watches the image and image also contains a title.i want this title as link to the page.my page is dynamic means when image change title changes.

this is my asp.net code

  <a rel="example_group" title='<%# ((ImageData)Container.DataItem).Name %>', href='<%=ConfigurationSettings.AppSettings["PublicImageURL"] %>preview/<%# ((ImageData)Container.DataItem).ProductId %>.jpg'>
                                                            <img class="PreviewLnk ImgBorder" alt='<%# ((ImageData)Container.DataItem).Name %>'
                                                                src='<%=ConfigurationSettings.AppSettings["PublicImageURL"] %>stamps/<%# ((ImageData)Container.DataItem).ProductId %>.jpg' />
                                                                 </a>
                                                  

this is my script function

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

plz give me the solution.

JFK

unread,
Apr 25, 2012, 8:36:17 PM4/25/12
to fancybox
how many questions do you have?
show a link to help you better

On Apr 25, 6:07 am, Bheesham Kumar Sharma <bhees...@techclove.com>
wrote:
Reply all
Reply to author
Forward
0 new messages