• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bootstrap Collapse won't collapse

Explorer ,
Jul 15, 2017 Jul 15, 2017

Copy link to clipboard

Copied

The mobile version of the bootstrap navbar opens but won't collapse when I hit the toggle button.  Seems none of the Bootstrap collapsibles close the way it should.  I'm using bootstrap version 3.3.7 for all the pages. 

The navbar is in an includes file and it works on it's own here, but when I include it on another page the navbar mobile version doesn't collapse.

Here's the link: Supreme Fireplaces

Markup: [PHP] <!DOCTYPE html>  <html lang="en"><head>      <meta charset="utf-8">  <meta http - Pastebin.com

Thanks,

Brandon

Views

7.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 16, 2017 Jul 16, 2017

You need to go through that code and clean up all the duplicate calls to jquery, bootstrap, your own css files etc. It's a mess as it currently stands. These duplicated links are as a result of them being in your 'include' files, which I informed you of in an earlier post, they should not be in the include files.

You should not have anything more than the following files linked to that page: Your mobile menu will then work.

CSS:

<!-- Fancybox -->

<link rel="stylesheet" type="text/css" href="http://www.supremem.com/new_2017/css/jquery.fancybox.min.css

...

Votes

Translate

Translate
Community Expert ,
Jul 16, 2017 Jul 16, 2017

Copy link to clipboard

Copied

You have called the jQuery library twice and well

  • line #32
  • line #323

You have also called the scroll to top function twice.

This is very confusing for any jQuery plugin such as Bootstrap.

My advice is to delete line #32 and lines #36 - #42

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 16, 2017 Jul 16, 2017

Copy link to clipboard

Copied

You need to go through that code and clean up all the duplicate calls to jquery, bootstrap, your own css files etc. It's a mess as it currently stands. These duplicated links are as a result of them being in your 'include' files, which I informed you of in an earlier post, they should not be in the include files.

You should not have anything more than the following files linked to that page: Your mobile menu will then work.

CSS:

<!-- Fancybox -->

<link rel="stylesheet" type="text/css" href="http://www.supremem.com/new_2017/css/jquery.fancybox.min.css">

<!-- Font Awesome -->

<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

<!-- Bootstrap -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Smartmenus -->

<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.smartmenus/1.0.1/addons/bootstrap/jquery.smartmenus.bo..." rel="stylesheet" type="text/css">

<!-- My Styles -->

<link href="http://www.supremem.com/mystyles.css" rel="stylesheet" type="text/css">

JS:

<!-- jQuery Library -->

<script src="https://code.jquery.com/jquery-1.12.2.min.js" integrity="sha256-lZFHibXzMHo3GGeehn1hudTAP3Sc0uKXBXAzHX1sjtk=" crossorigin="anonymous"></script>

<!-- Bootsrap Min -->

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!-- SmartMenus jQuery plugin -->

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.smartmenus/1.0.1/jquery.smartmenus.js"></script>

<!-- SmartMenus jQuery Bootstrap Addon -->

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.smartmenus/1.0.1/addons/bootstrap/jquery.smartmenus.bo..."></script>

<!-- Include jQuery & Filterizr -->

<script src="http://www.supremem.com/js/jquery.filterizr.js"></script>

<script src="http://www.supremem.com/js/controls.js"></script>

<!-- Kick off Filterizr -->

<script type="text/javascript">

$(function() {

//Initialize filterizr with default options

$('.filtr-container').filterizr();

});

</script>

<script>

$("a[href='#top']").click(function() {

$("html, body").animate({ scrollTop: 0 }, "slow");

return false;

});

</script>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 16, 2017 Jul 16, 2017

Copy link to clipboard

Copied

Thanks that did it!  I will clean up all the duplicates.

The reason the duplicates appear is because of the includes, if I have 2 separate files both needing similar dependencies, how should that be handled because if I don`t link those I can`t see how the file behaves when i open and edit them in Dreamweaver... 

Brandon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 16, 2017 Jul 16, 2017

Copy link to clipboard

Copied

brandonw6890098  wrote

Thanks that did it!  I will clean up all the duplicates.

The reason the duplicates appear is because of the includes, if I have 2 separate files both needing similar dependencies, how should that be handled because if I don`t link those I can`t see how the file behaves when i open and edit them in Dreamweaver... 

Brandon

Keep a browser window open showing the complete page code, edit the include files in DW, without any presentation and save it, re-fresh the browser window that's open with the complete code in it.

Mostly the include file code will be completed while still in  the main page before you move it into the include file, so you should only be doing minor tweaks in the include file. If you have to do a complete rewrite or some major changes bring the code back into the main page and work on it until such time as its complete or nearly complete then dump it back into the include file.

Find a workflow that suits you best.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 16, 2017 Jul 16, 2017

Copy link to clipboard

Copied

LATEST

Great I've always wondered how that was handled.  Thanks guys for all the help!

Brandon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines