Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7495679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:16:04+00:00 2026-05-29T18:16:04+00:00

I’m using Sponsor Flip Wall for displaying references on my webpage. Every reference should

  • 0

I’m using Sponsor Flip Wall for displaying references on my webpage.
Every reference should have few pictures previewed with Pretty Photo lightbox.
At first flip side there is a reference picture, and after it’s flipped over, I have reference description and below it a link for the gallery…

<?php

// Each sponsor is an element of the $sponsors array:

$reference = array(
    array('hram_hrista_spasitelja','Najzahtjevnija građevina u regiji u posljednje vrijeme. 23 000 elemenata kompletno napravljenih u našim pogonima, nekoliko rozeta izrađenih water-jetom, brojni stubovi i reljefi, ograde, mozaici te kompletni podovi izrađeni u mozaiku rezanom water-jetom, te brojni ostali zahtjevni elementi urađeni suvremenim CNC strojevima i završno urađeni umjetničkom rukom klesara.','../slike/reference/slike/hram_hrista_spasitelja/01.jpg','Hram Hrista Spasitelja - Banja Luka')
);

// Randomizing the order of sponsors:

shuffle($reference);

?>

<div class="tekst">

    <div class="referenceListHolder">

        <?php

            // Looping through the array:

            foreach($reference as $referenca)
            {
                echo'
                    <div class="reference" title="Kliknite za okretanje">
                        <div class="referenceFlip">
                            <img src="../slike/reference/'.$referenca[0].'.png" alt="Više o: '.$referenca[0].'" />
                        </div>

                        <div class="referenceData">
                            <div class="referenceDescription">
                                '.$referenca[1].'
                            </div>
                            <div class="referenceURL">
                                <a href="'.$referenca[2].'" rel="reference" title="'.$referenca[3].'">Galerija slika</a>
                            </div>
                        </div>
                    </div>                    
                ';
            }

        ?>       

        <div class="clear"></div>

    </div>

</div>

<script type="text/javascript">

    /* PRETTY PHOTO */
        $("a[rel^='reference']").prettyPhoto({
            animationSpeed: 'slow', /* fast/slow/normal */
            slideshow: 4000, /* false OR interval time in ms */
            padding: 40, /* padding for each side of the picture */
            opacity: 0.35, /* Value betwee 0 and 1 */
            overlay_gallery: false, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
            showTitle: true, /* true/false */
            allowresize: false, /* true/false */
            counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
            social_tools: false, /* html or false to disable */
            deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
            keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
            theme: 'dark_rounded' /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
        });
    /* KRAJ PRETTY PHOTO */ 

</script>

Pretty Photo doesn’t get fired this way, but the picture is being loaded in a new tab!
If I place the gallery link outside .referenceData div (eg inside .sponsorFlip div), it works fine…
I guess there is some conflict with .sponsorFlip click() event and prettyPhoto click() event ???

Here is the code for flipping the references…

//REFERENCE - FLIP PLUGIN
    $('.referenceFlip').live("click",function(){

        // $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):                
        var elem = $(this);

        // data('flipped') is a flag we set when we flip the element:               
        if(elem.data('flipped'))
        {
            // If the element has already been flipped, use the revertFlip method
            // defined by the plug-in to revert to the default state automatically:                 
            elem.revertFlip();

            //Prilikom vraćanja (revert) reference - vraća height na 100% (kako je i bio)
            $(this).css("height", "100%");

            // Unsetting the flag:
            elem.data('flipped',false)
        }
        else
        {               
            // Using the flip method defined by the plugin:                 
            elem.flip({
                direction:'lr',
                speed: 350,
                dontChangeColor: true,
                onBefore: function(){
                    // Insert the contents of the .sponsorData div (hidden from view with display:none)
                    // into the clicked .sponsorFlip div before the flipping animation starts:                          
                    elem.html(elem.siblings('.referenceData').html());
                }
            });

            //Ako dođe do overflow-a, povećava height reference za 50 kako bi stao sav tekst
            if($(this)[0].clientHeight < $(this)[0].scrollHeight)
                $(this).css("height", $(this).children().height()+50);

            // Setting the flag:
            elem.data('flipped',true);
        }

    });

Does anyone know where’s the problem ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T18:16:06+00:00Added an answer on May 29, 2026 at 6:16 pm

    I Finally managed to fix sponsor-flip-wall to work with PrettyPhoto !!!

    • Put the “rel” attribute to href:
    <div class="referenceURL">
      <a href="'.$referenca[2].'" rel="reference" title="'.$referenca[3].'">Galerija slika</a>
    </div>
    
    • PrettyPhoto has to be initiated inside $(‘.referenceFlip’).live(“click”,function(){…}.
      Place the code just before: elem.data(‘flipped’,true);

    $(“a[rel^=’reference’]”).prettyPhoto();

    !!! It should be working now !!!


    Here is the whole js code slightly changed from the original to suite my needs:

    //FLIP PLUGIN
    $('.referenceFlip').live("click",function(){
      // $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):              
      var elem = $(this);
    
      //Eliminates unnecessary PrettyPhoto gallery links
      elem.siblings().find('.referenceURL a:not(:first)').html("");
    
      //data('flipped') is a flag we set when we flip the element:              
      if(elem.data('flipped'))
      {
        // If the element has already been flipped, use the revertFlip method
        // defined by the plug-in to revert to the default state automatically:                 
        elem.revertFlip();
    
        //After reverting the flip - sets the height back to 100% (as it was)
        elem.css("height", "100%");             
    
        // Unsetting the flag:
        elem.data('flipped',false)
      }
      else
      {                 
        // Using the flip method defined by the plugin:                 
        elem.flip({
          direction:'lr',
          speed: 350,
          dontChangeColor: true,
          onBefore: function(){
            // Insert the contents of the .sponsorData div (hidden from view with display:none)
            // into the clicked .sponsorFlip div before the flipping animation starts:  
        elem.html(elem.siblings('.referenceData').html());  
          } 
        });
    
        //If the div overflows, increase the div's height for +50 to fit the entire text      
        if(elem[0].clientHeight < elem[0].scrollHeight)
          elem.css("height", elem.children().height()+50);
    
        /* PRETTY PHOTO INITIATION */
        $("a[rel^='reference']").prettyPhoto({
          animationSpeed: 'slow', /* fast/slow/normal */
          slideshow: 4000, /* false OR interval time in ms */
          padding: 40, /* padding for each side of the picture */
          opacity: 0.35, /* Value betwee 0 and 1 */
          overlay_gallery: false, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
          showTitle: true, /* true/false */
          allowresize: false, /* true/false */
          counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
          social_tools: false, /* html or false to disable */
          deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
          keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */
          theme: 'dark_rounded', /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
        });
        /* END OF PRETTY PHOTO INITIATION */    
    
        // Setting the flag:
        elem.data('flipped',true);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
What naming conventions are you using for namespaces and sponsor classes? (i.e. the classes
Using online interfaces to a version control system is a nice way to have
Using android 2.3.3, I have a background Service which has a socket connection. There's
I have been using the following metod using a for loop but it occurred
Using SolrNet for querying & faceting. I have a combination of int, tdate and
I'm using a few (2 or 3) master pages in my ASP.NET MVC application
I am using jQuery for my Ajax calls... I have x amount of Ajax
In CakePHP, when you are using Acl/Auth, do you need to have Routing.prefixes enabled
Using report builder 3.0, I have a report that queries a cube. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.