Asp.net photo gallery with fancybox not showing next/previos button

不问归期 提交于 2019-12-25 05:21:55

问题


I am working on asp.net photo gallery & i am using fancybox-1.3.4 to show images as overlay

It is working fine i have two issue with it.

One: It doesn't show the next / previews as show in the screen shot image below

Second: On the main galley i am using Custom Title for the Image i add span tags to it it comes up right when i click on the photo.but on the main gallery page when one hover over the image it show title which has span tags visible. It doesn't come up in the IE. I have to pass this title to the large overlay image. How can i hide it on the main page.


回答1:


  1. Galleries are created from elements that share the same rel attribute like

    <a class="fancybox" rel="gallery" ...>one</a>
    <a class="fancybox" rel="gallery" ...>two</a>
    

    etc. (navigation buttons won't appear if there are not at least two or more elements with the same rel attribute)

  2. You may prefer to get the fancybox title from the alt attribute of the image (img) tag so it won't be shown as tooltip when hover the thumbnail. Then add the option (Fancybox v1.3.4) 'titleFromAlt':true like

    $(".fancybox").fancybox({
     // API options here etc
       'titleFromAlt':true 
    });
    

Check this link for reference about fancybox title in v1.3.x



来源:https://stackoverflow.com/questions/11390764/asp-net-photo-gallery-with-fancybox-not-showing-next-previos-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!