Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Added 'add' method #184

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

Added 'add' method #184

wants to merge 7 commits into from

Conversation

iruy
Copy link

@iruy iruy commented May 31, 2016

Added 'add' method. Add a single item by passing an object

iruy added 6 commits May 31, 2016 15:44
Use like: $('#nestable').nestable('add',  { id: "item-ID", text: "Text here"} );
Object indexes "id" and "text" are mandatory, any extra index will be added as HTML5 "data-" attribute
addChild triggere if added element has 'parent' index set
@leon0707
Copy link

leon0707 commented Jan 7, 2017

'add' function throws an exception:
Uncaught TypeError: Cannot read property 'id' of undefined
at Plugin.add (jquery.nestable.js:143)

el is undefined.

Undefined element el error should be now fixed.
@pjona
Copy link

pjona commented May 24, 2017

@Alex1007 @iruy

There is a fork (with npm and bower installation) of this repository, where I added this functionality, check here: https://github.com/RamonSmit/Nestable

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants