Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery FancyBox 2.0:助手问题(按钮和拇指)_Javascript_Jquery_Button_Fancybox_Helpers - Fatal编程技术网

Javascript jQuery FancyBox 2.0:助手问题(按钮和拇指)

Javascript jQuery FancyBox 2.0:助手问题(按钮和拇指),javascript,jquery,button,fancybox,helpers,Javascript,Jquery,Button,Fancybox,Helpers,尽管严格遵循了fancybox新版本2的指南,我还是无法激活助手。我不明白我哪里出错了 这是我当前的代码: HTML: 您必须包含js和css文件: <!-- Add fancyBox - button helper --> <link rel="stylesheet" type="text/css" href="/js/fancybox/jquery.fancybox-buttons.css" /> <script type="text/javascript" s

尽管严格遵循了fancybox新版本2的指南,我还是无法激活助手。我不明白我哪里出错了

这是我当前的代码:

HTML:


您必须包含js和css文件:

<!-- Add fancyBox - button helper -->
<link rel="stylesheet" type="text/css" href="/js/fancybox/jquery.fancybox-buttons.css" />
<script type="text/javascript" src="/js/fancybox/jquery.fancybox-buttons.js"></script>


它应该会起作用。不知道为什么要在隐藏元素中添加链接,但可能必须这样做。

非常感谢!我忘了导入js和css:)现在可以了!嗨,安卓瑞安。你为什么不检查一下这个问题的答案?@Janis,你怎么可能知道,从这个问题上,你遗漏了什么@因为这是人们经常遇到的问题。顺便说一句,我建议尝试最新版本的fancyBox,它提供了工具栏和开箱即用的拇指
$(".fancybox-button").fancybox({
   openEffect   : 'elastic',
   closeEffect  : 'fade',
   revealEffect: 'none',
   hideEffect   : 'none',
   prevEasing  : 'swing',
   nextEasing  : 'swing',
   helpers  : { 
  title : { 
         type : 'inside' //inside/outside
      }, 
      buttons   : {}
   }
});
<!-- Add fancyBox - button helper -->
<link rel="stylesheet" type="text/css" href="/js/fancybox/jquery.fancybox-buttons.css" />
<script type="text/javascript" src="/js/fancybox/jquery.fancybox-buttons.js"></script>