开发者

prettyPhoto remove the expanding image option

does anyone know how to remo开发者_如何学Gove this silly expand image option (http://screencast.com/t/Xclao9m84) on the prettyPhoto? This makes no sense why someone would want this and it's ruining my logic. Any help would be greatly appreciated.


Simply add this to the page (or modify it for JS include).

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

via chibilicious


With the Wordpress theme I used which had the plugin there was a "js/jquery.prettyPhoto.js" file that contained the following settings:

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,

I just set the allow_expand option to false and that removed the expand image option.


Go to your prettyphoto.js and change this code:

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

with:

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

default is 'show' > change it in 'hide'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜