3

我正在使用 PrettyPhoto 创建画廊。我已经实现了 API 以尽快启动画廊。这是代码,它可以工作。

<!DOCTYPE html>
<html>
    <head>
        <title>jQuery lightbox clone - prettyPhoto - by Stephane Caron</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="js/jquery-1.6.1.min.js" type="text/javascript"></script>
        <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
        <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" charset="utf-8">
            $(document).ready(function(){
              $().prettyPhoto()
              api_images = ['images/fullscreen/2.jpg'];
              $.prettyPhoto.open(api_images);
            });
        </script>
    </head>
    <body>
    </body>
</html>

现在我需要从图库中删除一些东西,比如社交按钮。 是文档,在“自定义”部分有我需要的。我应该使用选项social_tools并将其设置为false,如何将其插入到上面的代码中?

此致

编辑:已解决!只需将这些指令作为 prettyPhoto 参数,如下所示:

<script type="text/javascript" charset="utf-8">
            $(document).ready(function(){
              $().prettyPhoto({social_tools: false, modal: true, allow_resize: true})
              api_images = ['images/fullscreen/2.jpg'];
              $.prettyPhoto.open(api_images);
              social_tools: false;  
            });
        </script>
4

0 回答 0