jquery - setting a limit of items, that can be dragged into a list -
I have these two lists, out of which I can move items from jquery UI to each other and to AJAX I can add lists together. If an item is drawn, a message is generated in a php file and then appears on the screen. Now I want to put ten items in the correct list for example, at max. It would be great that it would be possible with jquery, that if the list already has ten items and you go and drag it to the eleventh, then if the item will become extinct, maybe a bit effekt. I think reading DB in a PHP file might be probably if there are already ten items, and so on. But I do not have any idea at present, if and if that way, jquery will support such behavior. Can you give me some advice?
Greetings, Mashak
By the example, you can:
$ ("# draggable"). Draggable (); $ ("# Droppable") droppable ({drop: function} (if ($ ("# draggable"). Children () Length; 10) Return;}});
Anything in that line.
Comments
Post a Comment