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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:56:07+00:00 2026-06-12T16:56:07+00:00

Quick overview: 4 columns, each column has it’s own ul.category containing all the categories

  • 0

Quick overview: 4 columns, each column has it’s own ul.category containing all the categories available, and ul.filter which is where every list-item inside ul.category should go. All of these things should stay inside of that column.

The jquery

$("ul.category li.unselected").click(function() {
    $(this).removeClass("unselected").addClass("selected");
    $("ul.filter").append(this);
});
$("ul.filter li.selected").click(function() {
    $(this).removeClass("selected").addClass("unselected");
    $("ul.category").append(this);
});

And the html, this is just one column but there’s 3 more like this.

<div class="column themes">
    <ul class="filter">
        <!-- here go the clicked list-items -->
    </ul>
    <ul class="category">
        <li class="unselected"></li>
        <li class="unselected"></li>
        <li class="unselected"></li>
    </ul>
</div>

So, what this does right, is it changes the class on the clicked list-item to .selected and succesfully does the css changes as it should. What is does wrong, is instead of adding the list-item I clicked to just the ul.filter in the same column, it adds that list-item to the ul.filter in every column (basically duplicating it). Also, clicking a list-item in ul.filter doesn’t change the class back to .unselected, and doesn’t move it back to ul.category.

In short: Looking for a way to make this work in just the column it needs to work in, and a fix for moving the list-items back.

  • 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-06-12T16:56:09+00:00Added an answer on June 12, 2026 at 4:56 pm

    It’s appending the items to all the columns because you’re not selecting a specific column to append them to. Change the 2 lines of code that do the append to these…

    $(this).closest("div.column").find("ul.filter").append(this);
    

    and

    $(this).closest("div.column").find("ul.category").append(this);
    

    That does a search upwards from the clicked li and finds the nearest div element with the class .column and does the append there.

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

Sidebar

Related Questions

I'd like to get a quick overview of available solutions (libraries, ...) that allow
This one has stumped me. A quick overview I need to be able to
Quick overview: trying to build a gallery with a string from $_GET ('foo'), which
Here is a quick overview of the controllers functionality in most of the application:
Quick question, I have the following string which is a coma separated list of
Quick question, has anyone done a benchmark on random number generation between javascript and
Quick Wordpress question. Is it possible to check against a specific category, so not
As a quick overview: I'm trying to make a game of pool using Box2D
Could someone give me a quick overview of the pros and cons of using
I'm having trouble swapping Short Description (Quick Overview) with Additional Information (Attributes) Here's an

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.