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 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 a pretty simple ASP.NET Web Form that looks a bit like the
Good day, I have a project that requires that I share the design portion
I have googled a bit for how I should handle security in a web
I'm making an engine/CMS for story-based web browser games. I have quite a bit
i have bit of code that causes an underflow: var t1, t2, delta: DWORD:
I have a bit of code that fits theoretical prediction to experimental data, and
I have a bit of a problem that I can't seem to code my
I have a bit of a strange problem. I have a music app that
A little web design dilemma: I have a form with a lot of options,
I have to create a web site for a design company. Client's requirements are

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.