jQuery Sortable - Limit number of items in list.
Posted
by Adam
on Stack Overflow
See other posts from Stack Overflow
or by Adam
Published on 2010-03-13T13:38:44Z
Indexed on
2010/03/13
13:45 UTC
Read the original article
Hit count: 780
I have a schedule table I'm using jQuiry Sortable for editing.
Each day is a UL, and each event is an LI.
My jQuery is:
$("#colSun, #colMon, #colTue, #colWed, #colThu").sortable({
connectWith: '.timePieces',
items: 'li:not(.lith)'
}).disableSelection();
To make all LI's sortable except those with class "lith" (day names). User can drag an event from day to day, or add new events by clicking a button, which appends a new dragable event (LI) to the fist UL (Sunday).
I want to make each day accept only up to 10 events. How do I do this?
Thanks in advance!
© Stack Overflow or respective owner