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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:00:43+00:00 2026-06-17T17:00:43+00:00

I have a simple example of jquery ui. Basicly i have to list of

  • 0

I have a simple example of jquery ui. Basicly i have to list of items, each one is sortable. And what i want to accomplish is the following:
cancel sorting of the same list. with an example, if I click over an element on position one on list one, then drag it to position 6, and dropped. I want to prevent that, but if i drop the element in list two, that is ok.

i don’t know how to specify, in order to fit my requeriments. ConnectWith seems not to be enough:

$("#sortable").sortable({
    connectWith: [$('#sortable2')]
});

$("#sortable2").sortable({
    connectWith: [$('#sortable')]
});

here is the example:

http://jsfiddle.net/sQeZE/3/

  • 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-17T17:00:44+00:00Added an answer on June 17, 2026 at 5:00 pm

    This may not be exactly what you are looking for, but you can bind to the receive and stop events (they trigger in that order). receive indicates that a list item was received from another list. When this is triggered, you can temporarily unblock sorting. stop attempts to block sorting at all times:

    var blocksort = true;
    //Using jQuery 1.6.4, but use `.on` when available
    $("#sortable, #sortable2").bind('sortreceive', function () {
        blockSort = false;
    }).bind('sortstop', function (e) {
        if (blockSort) {
            e.preventDefault();
        }
        blockSort = true;
    });
    

    http://jsfiddle.net/sQeZE/5/

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

Sidebar

Related Questions

Simple example: I want to have some items on a page (like divs or
I have a simple Backbone view which uses jQuery UI's buttons. For example I
A simple example: Let's say I have one alias being sourced somewhere as: alias
I have a simple example of a toggle menu and I want to use
I have a relatively simple example of an MVC page that is using jQuery
I have been trying to get a simple example of the jquery-ui autocomplete to
I'm new to jquery deferreds. Here I have a simple example . Can anybody
I have a problem with the jquery sortable plugin. Indeed, I have items (questions)
I have setup a simple example to show a form inside a jquery UI
I have here a simple jQuery example wherein an element should be hidden. But

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.