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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:13:14+00:00 2026-05-23T16:13:14+00:00

I have a bit of web design that I’m trying to solve with efficient

  • 0

I have a bit of web design that I’m trying to solve with efficient Jquery, and it’s had me stumped for the past day. So I thought I’d turn to the experts at StackOverflow for help.

The Challenge:

I have a page with three div columns. Column 1 shows full resolution images. Column 2 shows large thumbnails of the elements that are currently displayed in column 1. Column 3 is a selector column that shows all available elements I can add.

I’ve been trying to code the following two functions using efficient jquery without luck:

  • If you click on any item in column 3 (the full selection column) – it correspondingly makes the div for the item visible in 2 and visible in 1
  • If you click the close button for any item on column 2, it hides the corresponding div in column 2 and the corresponding div in column 1.

See example: http://jsfiddle.net/mzhang23/CGfzq/8/ – this one tries to implement the html5 “data-eltype” suggested solution below without luck. What am I doing wrong?

  • 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-23T16:13:15+00:00Added an answer on May 23, 2026 at 4:13 pm

    I think the key is that you should store your data properly in with the objects. You an do this either through CSS descriptors or though HTML5-style data.

    Your objects then look like this:

    <div class="columnA">
       <div class="element house"></div>
    </div>
    
    <div class="columnB">
       <div class="element house"></div>
    </div>
    
    <div class="columnC">
       <div data-eltype="house" class="element"></div>
    </div>
    
    <script type="text/javascript">
    $(document).load(function(){
        $('.columnC .element).click(function(){
           $('.columnA, .columnB').find('.' + $(this).data('eltype')).show();
        }); 
    });
    </script>
    

    Although there are DOZENS of ways to do this, presented above is a simple bit of code that utilizes both CSS selectors along with HTML5 data. When an object in columnC is clicked, it utilizes the eltype data descriptor to toggle the visibility of the items in columns A & B.

    You might consider building a JSFiddle with a more detailed set of objects if you need additional help beyond this base-level description.

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

Sidebar

Related Questions

I have (after quite a bit of work) a web test that will upload
This a bit of strange one.... We have an internal web app that runs
I have this bit of code I found on the web at the end
I'm working through Practical Web 2.0 Appications currently and have hit a bit of
We have an enterprise web application where every bit of text in the system
I have this bit of javascript written with jQuery 1.2.5. It's contained inside the
I have a bit of code that basically reads an XML document using the
I have a bit of code that passes around a ton of objects and
I've been away from web design/development for a long, long now and have recently
I have this little bit of code: using System; using System.Web.Mvc; public class SecureFilter

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.