Mix PIXEL and PERCENT values for WIDTH & HEIGHT
  • Hi there,
    i'm really missing a functionality for your great script PrettyPhoto: when setting the width/height of the layer-window (iframe in this case!), i would like to have a fixed width of 400Px but an flexible height of 100% ... but it seems as you can't mix the different types of values like '?iframe=true&width=400&height=100%"' ... can you help me with this issue please - i think this could be a good one also for other users anyway.

    Thanks and beste regards,
    Kris from Hamburg/DE
  • FIX: edit jquery.prettyPhoto.js, lines 194 and 195 add this

    if(movie_height.indexOf('%') != -1) movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150);
    if(movie_width.indexOf('%') != -1) movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150);

    it allows the code to have one or the other, instead of both or nothing.


    and yes, it bugged me so bad, i fixed it. and really, it was easy.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!