Can't seem to get the onUpdate to work in for a sortable list. I am following the documentation and the included functional tests but nothing is firing for me. Any idea why?
I had the same problem, and the issue is probably in your markup. Each
item of the 'sortable' has to be named in the format 'string_integer'.
So this will work:
> Can't seem to get the onUpdate to work in for a sortable list. I am
> following the documentation and the included functional tests but
> nothing is firing for me. Any idea why?
You can easily customize this by resetting (in your own js file) the
Sortable.SERIALIZE_RULE to something else than
/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/
Regards,
Tobie
On Nov 16, 2:04 pm, Chris <numloc...@gmail.com> wrote:
> I had the same problem, and the issue is probably in your markup. Each
> item of the 'sortable' has to be named in the format 'string_integer'.
> So this will work:
> The items will still drag if they are not properly id'ed, but the
> onUpdate and onChange events will not fire.
> This drove me crazy for 3 days. I hope I can save you a similar
> headache.
> -Chris
> c h r i s AT u n t r o d DOT c o m
> On Nov 2, 10:18 am, Louis W <louis.wa...@sundancechannel.com> wrote:> Can't seem to get the onUpdate to work in for a sortable list. I am
> > following the documentation and the included functional tests but
> > nothing is firing for me. Any idea why?
Another thing which I just discovered is that, the element needs to have an id. So, if you try to make below ul sortable, it won't work. Sortable.options function is going to boomerang. Can't think of a neat solution to fix this, till then it is something to be careful about.
> I had the same problem, and the issue is probably in your markup. Each > item of the 'sortable' has to be named in the format 'string_integer'. > So this will work:
> The items will still drag if they are not properly id'ed, but the > onUpdate and onChange events will not fire.
> This drove me crazy for 3 days. I hope I can save you a similar > headache.
> -Chris
> c h r i s AT u n t r o d DOT c o m
> On Nov 2, 10:18 am, Louis W <louis.wa...@sundancechannel.com> wrote: > > Can't seem to get the onUpdate to work in for a sortable list. I am > > following the documentation and the included functional tests but > > nothing is firing for me. Any idea why?