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

Json Build Problem #96

Open
FabrizioFubelli opened this issue Dec 13, 2017 · 1 comment
Open

Json Build Problem #96

FabrizioFubelli opened this issue Dec 13, 2017 · 1 comment

Comments

@FabrizioFubelli
Copy link

FabrizioFubelli commented Dec 13, 2017

Expected behavior

In the README it's written that you can build a nestable, using a json.
After I filled up the nestable using a json, the default functions don't work.

For example, if I call

$('#nestable3').nestable('serialize')

it should returns a serielized object containing the items.

Actual behavior

$('#nestable3').nestable('serialize')

returns an empty array

Steps to reproduce the behavior

I used this format to build a nestable with json:

<div class="dd" id="nestable3">
    <ol class='dd-list dd3-list'>
        <div id="dd-empty-placeholder"></div>
    </ol>
</div>

After I filled up the nestable with a Json (following the "README" steps), I called the $('#nestable3').nestable('serialize') function, but it doesn't works.

I understood that the problem is in the "README.md" file, because the default functions in the nestable script, don't provide the <div> </div> tag; so the correct code to write in the "README.md" it's the following:

<div class="dd" id="nestable3">
    <ol class='dd-list dd3-list' id="dd-empty-placeholder">
    </ol>
</div>

instead of:

<div class="dd" id="nestable3">
    <ol class='dd-list dd3-list'>
        <div id="dd-empty-placeholder"></div>
    </ol>
</div>

Fork this template to reproduce issue.

@sbritz
Copy link

sbritz commented Jan 19, 2023

Big thanks for this solution. I had the same problem here. It would be great, if the readme would be updated.

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

No branches or pull requests

2 participants