• 0

jQuery UI Droppable Help


Question

Hello! I'm working on a project that has a little planner feature in it. I'm using jQuery UI with draggable and droppable to move the events from a list of choices to a table with lists in the cells. So far that part is working. What I also need is a way for the events to be removed, so I created a trash div and right now they can be dragged to the trash and they will be hidden from the list. The only problem is that when the events are added initially they remove the placeholder list item so without that other events cannot be added because the unordered list is pretty much non existent to be able to drag to after they have been deleted.

What I'd like to know is how to re add the .placeholder list item when an item from the list is removed.

Here is the test site to look at: http://caseymilstead.com/neowin.html

Thanks!

Link to comment
https://www.neowin.net/forum/topic/984766-jquery-ui-droppable-help/
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  On 24/03/2011 at 11:16, Mouldy Punk said:

I haven't looked at your code, but could you just recreate the element you remove when events are added and put it back when the trash an event?

It's probably worth pointing out that it seems like you're re-inventing the wheel a little bit.

That's actually what I want to do but I'm not really great at javascript, so I'm not sure how to target the source list to add it back.

This is part of a website I'm using for a competition, so we can use frameworks but everything else has to be original code. Otherwise I would definitely use that.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.