2015-04-03 25 views
0

我组建了一个照片网站,我坚持编辑的fancybox更改标题类型“过度”,使其悬停在图片...更改标题类型

这是jQuery的我对于fancybox,目前:

<script type="text/javascript"> 

     // use fancybox for hi-res images 
     $(document).ready(function() { 
      $("a.image-link").fancybox(); 
      noIndent(); 
     }); 


     // remove image indentation in paragraphs 
     function noIndent() { 
      $("a.image-link").fancybox(); 
      $(".post.text p:has(img)").addClass("no-indent"); 
      $(".post.text p a:has(img)").addClass("no-indent"); 
     } 

    </script> 

我在哪里添加标题参数?

回答

0

假设您正在使用fancybox 2,您需要按照指示here 在您调用fancybox函数时传递一个对象。

$("a.image-link").fancybox({ 
    "helpers": { 
     "title": { 
      "type": "over" 
     } 
    } 
});