Reply To: Menu Links Run Over to 2nd Line in some widths instead of collapsing

Home Forums Older releases 1.0.x Menu Links Run Over to 2nd Line in some widths instead of collapsing Reply To: Menu Links Run Over to 2nd Line in some widths instead of collapsing

#3717
admin
Keymaster

A couple of issues. You are loading jQuery, Bootstrap’s JS and a few other scripts with an “async” attribute added:

<script async type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js"></script>
...
<script async src="stuff/bootstrap.min.js"></script>
...
<script async src="stuff/swapimgrestore.js"></script>
<script async src="stuff/smoothlinkscroll.js"></script>

In short, this does not guarantee the other they are actually loaded/executed by the browser and they depend on proper load order (jQuery needs to be loaded first). You may need to learn a bit more how “async”/”defer” work if you would like to use any of them.

Quick solution is to remove the “async” attribute or replace it with “defer” (which preserves the script orders as linked in the source) but you will also need to add it to all other scripts you use that rely on jQuery.

Second issue – in “stuff/smoothlinkscroll.js” the following line produces a JS error:

$('a[href*=#]:not([href=#])').click(function() {

you need to change it like this:

$('a[href*="#"]:not([href="#"])').click(function() {

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?