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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:11:50+00:00 2026-06-17T23:11:50+00:00

I have a draggable element that I am creating a clone of and dragging

  • 0

I have a draggable element that I am creating a clone of and dragging to a drop zone. I want the draggable element to be re-draggable once it is set down in the drop zone correctly.

The odd behavior comes into play when I encapsulate the draggable div within another div. When it is encapsulated, it will not set the clone element to draggable, so I cannot re-drag the element. However, if in the jFiddle, you remove the divs from surrounding the draggable div, the thing works fine.

Working:

<div id="draggable"></div>

Not Working:

<div><div id="draggable"></div></div>

I need to know why the encapsulation is fooling around with this. It seems like it would be difficult to build a meaningful thing with a problem like this because I want to have a sidebar containing multiple draggables similar to these. Since building a sidebar requires encapsulating all these draggable elements within another div, you can see the conundrum I’ve happened upon.

The jFiddle links below contain the Jquery, and such.

Here is the jFiddle that doesn’t work rightly: here.
And, here is the jFiddle that works correctly: here.

The only difference in the one that doesn’t work: the dome class div is encapsulated by another div.

  • 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-17T23:11:51+00:00Added an answer on June 17, 2026 at 11:11 pm

    You need to remove the draggable on blah and add the draggable to the clone that is appended in the stop block.
    Try this:

    $(function() {
        var i=1;
        var indexP;
        var blah
    
        $(".dome").draggable({
            revert: 'invalid',
            helper: 'clone',
            start: function(event, ui) {
                var newId = i;
                $(ui.helper).attr("id",newId);
                indexP = $(ui.helper).attr('id');
                blah = "#" + indexP;
            },
            stop: function(event, ui) {
                $(ui.helper).append("<br><span>"+blah+"</span>");
                $(ui.helper).clone().appendTo('#cont').draggable();
    
                i++;
            },
    
        });
    
        $("#cont").droppable({
    
        });     
    });
    function updateStatus (x,y,i) {
        var xPos = "#x" + i;
        var yPos = "#y" + i;
        $(xPos).text(x);
        $(yPos).text(y);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of draggable images that I want to clone and then
I have some jquery code that i want to able to drag, drop, clone
I have a draggable element that I am dragging into one of various droppable
I have the following jQuery: $(document).ready(function () { $(.element).draggable(); $(.element).droppable({ drop: function () {
I have some particular need to clone an element (image) and be draggable inside
I have a draggable div element that uses HTML 5 localStorage to remember its
I have a problem with jQuery Drag&Drop. I have a draggable element and lots
I have multiple element that are jquery ui draggable, these elements can also be
Having a slight spot of bother... I have a draggable element that can be
I have a draggable element , that when its dropped onto the target, it

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.