Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding output object when using toHierarchy #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

treygeorge
Copy link

My team needed a bit more information on the objects that we were sorting. We did this through data attributes on the li's. We thought it would be real nice to add that information automatically to the output object on toHierarchy. We thought other people might think it convenient as well.

All we did for was add a $.each().data() loop on the item passed into "toHierarchy". We can then loop through the captured items and add them to the currentItem object as properties.

Loving nestedSortable so far. It is working really well for us. Thanks!

treygeorge added 2 commits September 13, 2013 19:19
Trying to make the final object output a little bit more useful by
allowing the developer to define any data- attribute and have it added
to the final object.
Removed the jquery each and opted for JS for instead.  Also, some minor
formatting polish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant