Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1311157

    Hello.

    I used the following solution for a previous post (https://kriesi.at/support/topic/lightbox-image-activation) to activate Enfold lightbox image.

    <?php echo ‘<div class=”avia-image-container avia-align-center “><div class=”avia-image-container-inner”></div>
    </div>’; ?>

    Everything is OK when the page is loaded.

    The page i am working has NEXT & PREVIOUS buttons and onClick retrieves data from database and loads the data in specific divs.
    This includes the change of href & src in the above code.

    After ajax,the lightbox is not working.

    Can you suggest me a way to fix this issue?

    Thank you in advance

    #1311401

    Hello again.
    I found the solution.

    STEP 1: I added the code below inside
    <span class=”image-overlay overlay-type-image” style=”left: 1.99219px; top: 0px; overflow: hidden; display: block; height: 100%; width: 98%; border-radius:5px;”><span class=”image-overlay-inside”></span></span>’

    Example:
    echo ‘<div class=”avia-image-container avia-align-center “><div class=”avia-image-container-inner”><a class=”lightbox avia_image” ‘
    . ‘ href=”myPhotoURL” target=”_blank”><img class=”avia_image ” title=”” ‘
    . ‘ src=”myPhotoURL” ‘
    . ‘ alt=”myALTtext” />’
    . ‘ <span class=”image-overlay overlay-type-image” style=”left: 1.99219px; top: 0px; overflow: hidden; display: block; height: 100%; width: 98%; border-radius:5px;”><span class=”image-overlay-inside”></span></span>’
    . ‘</div>’
    .'</div>’;

    STEP 2:
    After ajax code is finished, you must run this code to reload lightbox:

    //activates the lightbox
    if($.fn.avia_activate_lightbox){
    $(‘body’).avia_activate_lightbox();
    }

    #1311671

    Hi,

    Great, I’m glad that you found a solution, and thanks for sharing. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1311755

    Yes you can close this topic.
    Thank you.

    #1312160

    Hi,

    Thanks for letting us know, I’ll go ahead and close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘lightbox not working after ajax’ is closed to new replies.