jquery - setting a limit of items, that can be dragged into a list
Posted
by maschek
on Stack Overflow
See other posts from Stack Overflow
or by maschek
Published on 2010-01-24T22:44:36Z
Indexed on
2010/04/04
9:43 UTC
Read the original article
Hit count: 194
Hi, i have this two lists, from which i can move items from one to another with jquery ui and connect lists, with ajax. If an item is pulled over, a message is generated in a php file and then it appears on screen. Now i want that for example the right list should be allowed to contain ten items at max. It would be great if it would be possible with jquery, that if there is already ten items in the list and you go and drag the eleventh, if then the item would somehow vanish, maybe with a little effekt. I think maybe reading out db in the php-file if theres already ten items, and so on. But i have currently no idea, if and in case if in which way, jquery would support this kind of behaviour. Can you give me some advise?
Greetings, maschek
© Stack Overflow or respective owner