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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:36:03+00:00 2026-05-26T00:36:03+00:00

I have two div containers that are sortable and connected with connectWith . In

  • 0

I have two div containers that are sortable and connected with connectWith. In both there are sortable items that I can drag and drop as intended. These items have some classes, for example, group1 and group2. Let’s call containers container1 and container2. I need to make possible group1 items to be dragged and dropped into any of containers and group2 items to be dragged and dropped only inside container2. I have read jQuery docs but didn’t find an answer or an idea how to do this.

  • 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-26T00:36:04+00:00Added an answer on May 26, 2026 at 12:36 am

    Try subscribing to the receive event. I haven’t tested this, but my guess is that if you return false (the standard pattern for blocking events in jQuery), the items dropped won’t be added to a list. Here’s some pseudo-code to get you started…

    $("...").sortable(
    {
        receive: function ()
        {
            // assuming that "this" maps to the current object being dragged
            if (this.className.indexOf("...")) return false;
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a container div that holds two internal divs; both should take 100%
I have two sortable lists that are connected. One is simply on the page,
I have two nested div s that are supposed to both be 400 pixels
Is there a way to have two <div> containers, one having a static height,
I have an ASP.NET page that contains two div's. Both have search fields and
I have two div elements that are twins (i.e. their dimensions and contents are
The scenario is I have two div s: one is where I select items
I have a that contains two nested div's. One of the nested div's contains
I have two jquery scripts on one page that both target on-site links via
I have two elements which can vary in heights and both floated next to

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.