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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:39:46+00:00 2026-05-11T15:39:46+00:00

I am now able to drag an item to a sortable. But the sortable

  • 0

I am now able to drag an item to a sortable. But the sortable list has a different DOM.

<!-- The draggable items. Has the 'original' DOM in the LI tags. --> <ul class='draggable_text'>     <li><span>DRAG THIS A</span></li>     <li><span>DRAG THIS B</span></li> </ul>   <!-- This list has a different DOM in the LI tags --> <ul id='stagerows'>     <li><p>This is a new DOM dragged from 'DRAG THIS A'</p></li>     <li><p>This is a new DOM dragged from 'DRAG THIS B'</p></li> </ul>  $(document).ready(function() {     $('.draggable_text > li').draggable({         //helper:'clone',         helper: function(event, ui) {             return '<div style='width: 100px; height: 50px; border: 1px solid #000; background-color: #fff;'>xxx</div>';         },         connectToSortable:'#stagerows'     });      $('#stagerows').sortable({         handle: '.drag_handle'     }); }); 

The Helper has this: xxx This should be dropped into the sortable…

The ‘helper’ works. But when I ‘dropped’ the item into the sortable, it just reverts back to the ‘original’ DOM. I would want the ‘newly created DOM’ (the one created in helper) to be dropped into the sortable.

I hope I am making sense. Thank you!

Another way of saying it: when I drag an apple, it now turns into an orange. but when i drop it, it turns back into an apple..

  • 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. 2026-05-11T15:39:47+00:00Added an answer on May 11, 2026 at 3:39 pm
    $('.draggable_text > li').draggable({     helper: function(event, ui) {         var type = $(this).find('.link_type').val();         return create(type,0);     },     connectToSortable:'#stagerows' });  $('#stagerows').sortable({     handle: '.drag_handle',     placeholder: 'placeholder_sortable' });  /**  * When item is dropped from the Add <Stuff>  */ $('#stagerows').droppable({     drop: function(event, ui){         type = ui.draggable.find('.link_type').val();         ui.draggable.empty();         return ui.draggable.html(create(type,0))     } }); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have draggable list of < li > elements which I'm able to drag
i have a image view which is drag able and zoom able but now
I should really be able to read a regexp by now, but all the
My page contains some drag-able div elements ( not jQuery UI dragable ). Now
Greetings, I need to be able to drag and drop items that's contained in
I have a sortable list of videos initialised with the option: items: '.videoBox:not(.isFirst, .isLast)',
i make a class of elements draggable like this jQuery(.drag).draggable(); jQuery(.drop).droppable({ accept: .drag, drop:
I have put my tns connection into the .ora file and am now able
Thanks to the epic work of Dennis Williamson, I am now able to calculate
I've been learning about divs over the past few months, and am now able

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.