JSFiddle - React, Tailwind, and code Playground

by Bryan Miner

HTML

<nav>
    <ul>
        <li class="itm">A
            <ul>
                <li>One</li>
                <li>Two
                    <ul>
                        <li>Menu Item</li>
                        <li>Menu Item</li>
                        <li>Menu Item</li>
                    </ul>
                </li>
                <li>Three</li>
                <li>Four</li>
            </ul>
        </li>
    </ul>
</nav>

CSS

ul ul {
    display:none;
}

nav {
    cursor: pointer;
}

JavaScript

$('ul li').onclick(function () {
    $(this).children('ul').fadeIn('fast');
},
function () {
    $(this).children('ul').fadeOut('fast');
});