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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:58:24+00:00 2026-05-27T13:58:24+00:00

I am working on a tool based on jQuery UI draggable functionality. I have

  • 0

I am working on a tool based on jQuery UI draggable functionality.

I have a number of boxes in the left column of the table. When they are dragged in yellow area, I would expect the remaining divs to move upwards to fill the space left by the box that was moved.

But it’s not happening. Why?

  • 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-27T13:58:24+00:00Added an answer on May 27, 2026 at 1:58 pm

    It is pretty difficult to test but from my knowledge on the question here is a possible cause/solution to this.

    The droppable plugin does not remove the dragged element from its original markup position, it is visually moved to the droppable element (with some option allowing to accept to drop certain elements or not, events, etc).

    The elements have a position: relative css rule, which represents the “normal flow” for elements (in the order they appear in the markup). So even if the element is visually placed elsewhere on the page with css, its place in the markup is still the same and it is still taking the space it normally should.

    This fiddle illustrate what i’m trying to explain 🙂

    By looking at the source code form the “working website”, they actually remove the dragged element from the original draggable list and re-create it in the droppable list !

    When they define the .droppable() they do this:

    h.droppable({
        tolerance: "intersect",
        accept: ".card",
        greedy: true,
        drop: function (a, b) {
            card = b.draggable;
            putCardIntoStack(card, c)
        }
    });
    

    On the drop event, they call putCardIntoStack(card, c) passing the currently dragged element as the card parameter. Within this method, they remove the original “card” (a.remove()) and re-create it in the dropzone (newcard = createCard();):

    function putCardIntoStack(a, b) {
        progressVal = $('#progBarRd').width();
        card_idDOM = a.attr('id');
        card_idDB = card_idDOM.substr(IDPREFIX_CARD.length, card_idDOM.length - IDPREFIX_CARD.length);
        stack_idDB = b.substr(IDPREFIX_STACK.length, b.length - IDPREFIX_STACK.length);
        $.ajax({
            url: URL_DRAGDROPAJAX,
            type: 'POST',
            data: 'action=movecard&cardid=' + card_idDB + '&tostack=' + stack_idDB + '&prog=' + progressVal
        });
    
        // 'a' is the card
        // they extract the id/content from the dragged card
        cardId = a.attr('id');
        cardLabel = a.text();
    
        // they remove the card from the DOM
        a.remove();
    
        // they create a new card with the extracted info
        newcard = createCard(cardId, cardLabel);
        newcard.addClass('stackcard');
    
        // and append it to the dropzone
        $('#' + b).removeClass("empty").find('.stackDrop').append(newcard);
    
        globalcheck()
    }
    

    jQuery UI does a similar thing on the droppable demo page. On the drop event, they call a function deleteImage() which removes the dragged image from the original markup and appends it to the drop zone.

    I hope I’m clear enough 🙂
    I also hope I’m right, it is pretty difficult to test quickly but it makes sense 🙂

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

Sidebar

Related Questions

I'm working on a news slider based on the well-known jQuery Tool Scrollable. On
I'm working on a internal web based tool for my company. Part of this
I am working on a Web based organisation tool. I am not aiming the
I am working on a C++ based command line tool and I want to
I am working on a tool that monitors a number of applications and ensures
I'm working on a I/O verification tool based on Linux in a game project.
I'm working on a Perl-based file synchronization tool. It downloads files into a temporary
Hej there, I am currently working on a PHP-based Tool to monitor a rather
I have used the Heat tool to generate a wxs file based on a
BACKGROUND I have been working on a tool that is supposed to work in

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.