Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Thanked 0 Times in 0 Posts

    Prettyphoto opening in iframe Parent

    I think I'm close to getting this to work--I just don't know where to go from here.

    I'm trying to get my Prettyphoto pop-up to open in the parent frame. It appears to work on the SECOND CLICK (although still shows the pop-up in the embedded frame).

    Any help would be MUCH appreciated.

    Here is the page calling the iframe (parent):


    and its code:

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>

    <script src="vertical_files/jquery.js" type="text/javascript"></script>
    <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen"/>
    <script src="js/jquery.prettyPhoto.js" type="text/javascript"></script>

    <script type="text/javascript" charset="utf-8">

    $(function() {
    $('#ifrm').load(function() { $('.iframe:hidden').show('slow'); $(function() { $("#ifrm").contents().find("a[rel^='prettyPhoto']").click(function() { $(this).prettyPhoto(); return false; } ); }); }); return false; })

    $(function() {
    $("#ifrm").contents().find("a[rel^='prettyPhoto']").click(function() { $(this).prettyPhoto(); return false; } );


    And here is the embedded page:

    Last edited by jdorsey; 09-24-2011 at 03:55 PM. Reason: add prefix


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts