Jquery Dynamic Div Addition With Droppable Attribute
I am trying to build a layout page. this page has 1 main panel. if a user clicks 'create new tab' I want to build a new div, and make that div droppable. In this watered down exa
Solution 1:
You have to make every new div dropable on its own. After you created a new div you need to apply jQuerys dropable-method. Dropable is not applied to elements that are created in future and matching your selector before, so you have to do this on your own.
var newDiv = jQuery('<div class="drop" />').droppable().attachTo('body')
i modified your example here: http://jsfiddle.net/Valtos/dQzy5/7/
Post a Comment for "Jquery Dynamic Div Addition With Droppable Attribute"