mjsarfatti/nestedSortable — Issue #3: toArray() uses the id attribute hardcoded to get parentItem
Author: Avaq
Created: 2011-12-06 12:29:09+00:00
State: open

on line 271 is the following code:

$(item).parent(o.listType).parent('li').attr('id')

It grabs the id from the parent item, however the id doesn't always have to be inside the HTML id attribute (as taken into account when selecting the item id on line 266):

$(item).attr(o.attribute || 'id')

In order for users to pass their own attribute without getting a "can not call match() on undefined" error the piece of code on line 271 that I showed needs to change to:

$(item).parent(o.listType).parent('li').attr(o.attribute || 'id')