I’m having some trouble with jquery’s drag and drop. I want to drag only 1 element from each ‘ul’. So the result i want is a ‘test’ and a ‘foo’ in the red box. How can i keep track of what elements are in the red box?
Here is the code:
http://jsfiddle.net/9edge/CTpTr/
thanx in advance
Fill two seperate counters, one for each item type (And give your items classes to identify them).
Use the check() function to check your limits, and return true/false if reached or not, use the drop() function to update your counter.
Fiddle
New Fiddle with IDs fixed