Hi All, I am trying to create a div where the components are draggable and droppable. This is based on the simple photo manager example shown here
http://jqueryui.com/demos/droppable/#photo-manager Here is a code snippet of the html ------------------------------------------------------------------------------ <div id="bjpdiv"><h3><a id="bjp" href='#'>Bharatiya Janata Party</a></ h3><div id="bjp_stuff"> <ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix"> <li class="ui-draggable" title="mp">mp</li> <li class="ui-draggable" title="mp">mp</li> <li class="ui-draggable" title="congress">congress</li> <li class="ui-draggable" title="governor">governor</li> <li class="ui-draggable" title="person travel">person travel</li> <li class="ui-draggable" title="deputy opposition leader">deputy opposition leader</li> <li class="ui-draggable" title="jordan kazakhstan kenya">jordan kazakhstan kenya</li> <li class="ui-draggable" title="bjp candidate">bjp candidate</li> <li class="ui-draggable" title="chief minister">chief minister</li> </ul> </div> ------------------------------------------------------------------------------------ This works fine when I have the html hardcoded on my webpage, allowing me to drag and drop the li elements to another area. However, when I dynamically try to create the li elements using javascript, these elements lose the drag and drop property, even though the html is rendered exactly as shown above. The reason I am trying to populate the li elements dynamically is that I am obtaining the content from the backend using JSON. I have tried all possible ways to dynamically populate this list, and I see that when I dynamically populate it, the elements lose the drag and drop property but if it is hardcoded, the same elements can be dragged and dropped. I am relatively new to javascript and jquery, so any help would be greatly appreciated. Thanks and regards, Titash --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
