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

  • SEARCH
  • Home
  • 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 354483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:55:42+00:00 2026-05-12T11:55:42+00:00

I have a page where I am loading bunch of images initially when the

  • 0

I have a page where I am loading bunch of images initially when the page loads. These images are tied to the lightbox plugin and when i click on the images..the plugin does do what it is supposed to. However, I have some ajax added via jquery (triggered by a drop down box) which updates the list of images based on what it gets from the server. After the list of images is reloaded the lightbox plugin does not seem to work anymore.

Does anyone know if something special needs to be done?

Following is the code in my html page (this works):

<div id="gallery">
    <ul id="imagesall">    
       <li>    
         <a title="" href="/catalogFiles/cfil837.jpg">    
          <img height="72" width="72" alt="" src="/catalogFiles/cfil838.jpg"/>    
         </a>    
        </li>
        <li>
         <a title="" href="photos/image2.jpg">
          <img height="72" width="72" alt="" src="/catalogFiles/cfil840.jpg"/>
         </a>
         </li>    
    </ul>
</div>

and following is the jquery ajax functionality. Thanks to seth (now i wish SO had mention functionality like twitter 🙂

jQuery(function(){
  jQuery("select#rooms").change(function(){
    var options = '';
    jQuery.getJSON("/admin/selection.php",{id: jQuery(this).val(), ajax: isAjax},
function(j){
      for (var i = 0; i < j.length; i++) {
 var ul = jQuery('ul#imagesall').empty();
 var images = j[i].images.split(',');
        jQuery.each( images , function(idx, img ) {
ul.append('<li><a title="test" href="/catalogFiles/'+img+'.jpg"><img alt="" src="/catalogFiles/' + img + '.jpg" height="72" width="72"/></a></li>');
        })
          }
        })
      })
    })
  • 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-12T11:55:42+00:00Added an answer on May 12, 2026 at 11:55 am

    Most jQuery lightbox plugins scan the page and insert their functionality at the page load event (or rather, the jQuery document ready event). This functionality modifies the DOM to allow the cool lightbox effect to appear. However, these changes are overwritten by your AJAX call.

    My suggestion would be to dive into the lightbox source and find the function that performs the work on your DOM, and call it after your ajax request comes back successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading content into a page with ajax that will have live click
I have a bunch of images on a page that are contained within a
I have a bunch of images on a page and for the purpose of
I have ASPX page where I store images. The URL for these images are
How can we change body ID while page loading? I have just developed an
I have a page in which I am loading a user control dynamically as
I am trying to place a Loading Animation onto my page but have never
I have a form loading inside my page and there is a button out
I have a Jquery Mobile page into which I'm loading a form via AJAX.
i'm building a restaurant's website, and have their menus loading as images in modals

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.