代码之家  ›  专栏  ›  技术社区  ›  Zach Smith

prettypto删除展开图像选项

  •  1
  • Zach Smith  · 技术社区  · 16 年前

    3 回复  |  直到 16 年前
        1
  •  3
  •   Thomas Paine    14 年前

    只需将其添加到页面(或修改JS include)。

    $(document).ready(function(){
        $("a[rel^='prettyPhoto']").prettyPhoto(
        {
            allow_resize: false, /* Resize the photos bigger than viewport. true/false */
        });
    });
    

    通过 chibilicious

        2
  •  3
  •   freshyseth    12 年前

    我使用的Wordpress主题有一个插件 包含以下设置的文件:

    opacity: 0.80, /* Value between 0 and 1 */
    show_title: true, /* true/false */
    allow_resize: true, /* Resize the photos bigger than viewport. true/false */
    allow_expand: false, /* Allow the user to expand a resized image. true/false */
    default_width: 500,
    default_height: 344,
    

    我刚把 allow_expand

        3
  •  1
  •   ThiefMaster    14 年前

    转到prettypto.js并更改以下代码:

    if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}
    

    使用:

    if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').hide();}
    

    默认值为“显示”>在“隐藏”中更改