vmitsaras/js-offcanvas

First project not working

lcsqlpete opened this issue · 2 comments

Just downloaded and set everything up using the Codepen example. I see the Left button and the para text I put in the aside display immediately on page load and clicking the button does nothing. No console error and the css and js files are where they're supposed to be.

Help please, html is below. This on OSX Catalina running Chrome.

`

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Offcanvas</title>
    <link rel="stylesheet" href="https://cdn.kleenedge.com/dev/css/js-offcanvas.css">
</head>

<body>

    <main class="c-offcanvas-content-wrap" role="main">
        <button class="c-button js-offcanvas-trigger" data-offcanvas-trigger="off-canvas-left">Left</button>
    </main>

    <!--Offcanvas Panels-->
    <aside class="js-offcanvas" id="off-canvas-left" role="complementary"><p>Here it is!</p></aside>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.kleenedge.com/dev/js/js-offcanvas.pkgd.js"</script>
    <script>
        $(function () {
            $(document).trigger("enhance");
        });
    </script>

</body>
`

Hi @lcsqlpete

you missed a closing tag (>)

 <script src="https://cdn.kleenedge.com/dev/js/js-offcanvas.pkgd.js"</script>
 <script src="https://cdn.kleenedge.com/dev/js/js-offcanvas.pkgd.js"></script>