Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1419
  • Last Modified:

Get value array from JQuery droppable

How can I retrieve array value from jquery droppable div?
0
edyonline
Asked:
edyonline
1 Solution
 
MacAnthonyCommented:
Are you asking for the index of the droppable set?

If my assumption is off base, you will have to be a bit more descriptive of what you want.

I haven't tested it out so if this doesn't get you on the right track, let me know and I'll put together an actual working example (I don't have jqueryUI installed ATM). Hopefully this helps before I get a chance to make a proper example anyway. I think it would work something like this:


var droppedIndex = null;
 
$('DIV.droppables').droppable({
   drop: function(event, ui) { droppedIndex = $('DIV.droppables').index(this); }
});

Open in new window

0
 
edyonlineAuthor Commented:
for example, i want to create drag and drop shopping cart. how can i know all the item that i dropped to the shopping cart?

thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now