2

I am trying to implement Slicknav plugin on a website, but it seems not to be loading the js, or not applying required actions defined by it. I have prepared a LIVE DEMO with just the HTML code of the nav, as specified on SlickNav's website

The only things added on the DEMO are the HTML code, the piece of script on it to run the nav, and the js and css files to make it work, as specified on editors website:

HTML

   <ul id="menu2">
    <li>Parent 1
        <ul>
            <li><a href="#">item 3</a></li>
            <li>Parent 3
                <ul>
                    <li><a href="#">item 8</a></li>
                    <li><a href="#">item 9</a></li>
                    <li><a href="#">item 10</a></li>
                </ul>
            </li>
            <li><a href="#">item 4</a></li>
        </ul>
    </li>
    <li><a href="#">item 1</a></li>
    <li>non-link item</li>
    <li>Parent 2
        <ul>
            <li><a href="#">item 5</a></li>
            <li><a href="#">item 6</a></li>
            <li><a href="#">item 7</a></li>
        </ul>
    </li>
</ul>

Script piece on the html file:

<script>
$('#menu2').slicknav({
    label: '',
    duration: 1000,
    easingOpen: "easeOutBounce", //available with jQuery UI
    prependTo:'#menu2'
});
</script>

Js and Css linked

<link rel="stylesheet" href="css/slicknav.css" />
<script src="js/jquery.slicknav.min.js"></script>
VMAtm
  • 27,943
  • 17
  • 79
  • 125
Biomehanika
  • 1,530
  • 1
  • 17
  • 45

1 Answers1

1

Solution: setting scripts at the bottom of the file

@Vitorino Fernandes: try adding all the js files at the bottom like view-source:http://slicknav.com/

Biomehanika
  • 1,530
  • 1
  • 17
  • 45