Roshan Book

My Tech Notebook

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:

    }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 = '';

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: