using dynamically sortable

0

Each time I drag and drop the input bar of type text into the buttons, you must generate the same input bar below the header menu.

Problem:

Every time I drop the input inside the buttons, this same input adds and does not generate a new one. how to implement this part?

  <h2> Menu </h2>
  <div id="menu" class="connectedSortable"></div>

  <h2> Botoes </h2>
  <div id="tbody-content" class="connectedSortable"></div>

sortable

$("#menu").append(appendMenu());

$('#tbody-content').sortable({ items: 'ul' });
$( "#menu" ).sortable({
    connectWith: ".connectedSortable"
}).disableSelection();

No jsFiddle

    
asked by anonymous 10.08.2015 / 22:39

1 answer

0

So I understand it would be to add a new text box in the button area by making a clone.

link

$('#content').sortable({ 
    items: 'ul',
    revert: "invalid"
}).droppable();

$( "#menu" ).draggable({
  helper: 'clone',
  connectToSortable: "#content"
}).disableSelection();
    
11.08.2015 / 20:23