# NestableJS

## Install

#### npm

    npm install nestablejs --save

## Browser

Grab the files from the CDNs and include them in your page:

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nestablejs@latest/dist/nestable.css">

    <script src="https://cdn.jsdelivr.net/npm/nestablejs@latest/dist/nestable.js"></script>

## Initialise

This will create a new instance from the "#myList" element.

    <ol id="myList">
        <li>Item 1</li>
        <li>Item 2
            <ol>
                <li>Item 3</li>
                <li>Item 4</li>
            </ol>
        </li>
        <li>Item 5</li>
        <li>Item 6</li>
        <li>Item 7</li>
        <li>Item 8</li>
    </ol>

    const instance = new Nestable("#myList");

1. Item 1
2. Item 2
   1. Item 3
   2. Item 4
3. Item 5
4. Item 6
5. Item 7
6. Item 8