Sumit patel Sumit patel - 3 months ago 12
HTML Question

Drop control in sub panel and Add new Div using jquery


Note: I have tried other question asked in stackoverflow related to
Drag and drop but i'm unable to do so.


First drag and drop a
'Div'
into
'DropDiv'
. Then try to drop textbox in
'Div Sub Panel'
.

I want to


  1. drop Textbox in
    'Div Sub Panel'
    .

  2. I click To
    'Add New Div '
    Then Function Not Work



Here is my DEMO Code

Answer

Only Update Draggable in connectTosortable in add one more add Class claspaneldiv

Add claspaneldiv to connectTosortable

$(".clsDragItem").draggable({
            connectToSortable: '#MainDroppableDiv,.claspaneldiv',

here is demo:

http://jsfiddle.net/yb3dj5om/1/