Request Ajax Request

1

<script>
    document.querySelectorAll('[wm-folder]').forEach(folder => {
        folder.onclick = function(e){
            console.log('teste')
        }
    })
</script>
<h1>Projeto</h1>
<ul>
    <li>
       <span wm-folder>beckend</span> 
        <ul>
            <li>
                <span wm-folder>app</span> 
                <ul>
                    <li>produto.js</li>
                    <li>usuario.js</li>
                    <li>venda.js</li>
                </ul>
            </li>
            <li>
                <span wm-folder>config</span>
                <ul>
                    <li>banco.js</li>
                    <li>rotas.js</li>
                    <li>servidor.js</li>
                </ul>
            </li>
        </ul>
    </li>
    <li>
       <span wm-folder>frontend</span>
            <ul>
                <li>
                   <span wm-folder>public</span> 
                    <ul>
                        <li>app.css</li>
                        <li>app.jss</li>
                        <li>index.html</li>
                    </ul>
                </li>
            </ul>
    </li>
</ul>

Clicking does not work "console.log", what is the error?

    document.querySelectorAll('[wm-folder]').forEach(folder => {
        folder.onclick = function(e){
            console.log('teste')
        }
    })
<h1>Projeto</h1>
<ul>
    <li>
       <span wm-folder>beckend</span> 
        <ul>
            <li>
                <span wm-folder>app</span> 
                <ul>
                    <li>produto.js</li>
                    <li>usuario.js</li>
                    <li>venda.js</li>
                </ul>
            </li>
            <li>
                <span wm-folder>config</span>
                <ul>
                    <li>banco.js</li>
                    <li>rotas.js</li>
                    <li>servidor.js</li>
                </ul>
            </li>
        </ul>
    </li>
    <li>
       <span wm-folder>frontend</span>
            <ul>
                <li>
                   <span wm-folder>public</span> 
                    <ul>
                        <li>app.css</li>
                        <li>app.jss</li>
                        <li>index.html</li>
                    </ul>
                </li>
            </ul>
    </li>
</ul>
    
asked by anonymous 13.08.2018 / 04:56

0 answers