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 6047127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:19:01+00:00 2026-05-23T07:19:01+00:00

I have the next code with some thumbnails: <div class=gallery-wrap> <div class=gallery galleryid-45 id=gallery-1>

  • 0

I have the next code with some thumbnails:

<div class="gallery-wrap">
    <div class="gallery galleryid-45" id="gallery-1">
        <dl class="gallery-item">
            <dt class="gallery-icon"> <a href="http://somedomain.com/wp-content/uploads/2011/06/ring-wedding.jpg"><img height="66" width="67" class="attachment-thumbnail" src="ring-wedding-67x66.jpg"></a> </dt>
        </dl>
        <dl class="gallery-item">
            <dt class="gallery-icon"> <a href="http://somedomain.com/wp-content/uploads/2011/06/wedding-rings.jpg"><img height="66" width="67" class="attachment-thumbnail" src="wedding-rings-67x66.jpg"></a> </dt>
        </dl>
        <dl class="gallery-item">
            <dt class="gallery-icon"> <a href="http://somedomain.com/wp-content/uploads/2011/06/wedding-ring-test-31.jpg"><img height="66" width="67" class="attachment-thumbnail" src="wedding-ring-test-31-67x66.jpg"></a> </dt>
        </dl>
        <br style="clear: both">
    </div>
</div>
<div id="imageBox">&nbsp;</div>

It’s a gallery generated by wordpress with the built in gallery function which was customized a little bit by me.

I would like whenever I click on a thumbnail, the image to change in #imageBox. I would like to test two situations,

  1. when page loads and #imageBox to be empty,
  2. when page loads and #imageBox to have included already the first image according the first thumbnail 🙂

I know there is a solution (Click on a thumbnail, an image in a div changes) but is not working for me and I think it is because a different HTML markup structure.

Does anyone have an idea how to start/solve this issue?

  • 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-23T07:19:02+00:00Added an answer on May 23, 2026 at 7:19 am
    $(".gallery-item a").click(function (evt) {
      evt.preventDefault();
      $("#imageBox").empty().append( 
        $("<img>", {src: this.href})
      );
    });
    

    See it working: http://jsfiddle.net/kq9bp/1/

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

Sidebar

Related Questions

I have the next code in javascript. I deleted some unnecessary items because it
I have the following code: if ($_POST['submit'] == Next) { foreach($_POST['info'] as $key =>
In my fieldset I have labels next (side) to my textboxes, but for some
I have the next code to work on ASP.Net controls. I'm trying to add
I have next code: #include <iostream> #include <algorithm> #include <map> #include <iterator> //namespace std
I have next code: PhotoFactory factory = PhotoFactory.getFactory (PhotoResource.PICASA); PhotoSession session = factory.openSession (login,
I have the next code where I defined a WPF toolkit datagrid control called
I have some code like below in an aspx page: function CheckEditing() { var
I have some code that consists of a lot (several hundreds of LOC) of
I have some code that I am using to count characters in an input/textarea

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.