Roshan Book

My Tech Notebook

Monthly Archives: July 2012

Passing variable via pretty photo iframe

Here is a snippet from the unminified version of jquery.prettyPhoto.js. Notice the third line, where it deletes everything after the questionmark in the movie_url.

    }else if(pp_type == 'iframe'){
      movie_url = $caller.attr('href');
      movie_url = movie_url.substr(0,movie_url.indexOf('?'));

      pp_typeMarkup = '';
    }

I’m not sure how intrepid you’re feeling but if you comment out that third line it’ll work for you. (you’ll probably want to re-minify afterwards see: http://fmarcia.info/jsmin/test.html)

    }else if(pp_type == 'iframe'){
      movie_url = $caller.attr('href');
      // movie_url = movie_url.substr(0,movie_url.indexOf('?')); // commented out to allow other attributes to be passed along.

      pp_typeMarkup = '';
    }
Advertisements
%d bloggers like this: