Navbar in Bootstrap it opens, but it does not close on mobile - frameworks

My navbar on the phone opens, but it does not close.
<div class="carousel-inner">
<nav class="navbar navbar-expand-lg navbar-light bg-primary nawigacja">
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar10">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navbar10">
<ul class="navbar-nav nav-fill w-100">
<li class="nav-item">
<a class="nav-link" href="#">First tab</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="#button1">2nd Tab</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="#button2">3rd Tab</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="#button3">4th tab</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="#button4">5th Tab</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">6th Tab</a>
</li>
</ul>
</div>
</div>
in the elements I see that before clicking the code looks like this:
<div class="navbar-collapse collapse" id="navbar10">
and literally for a few seconds the code changes into:
navbar-collapse collapsing
next in 1 sec:
navbar-collapse collapse show
after another click it changes to
navbar-collapse collapsing
and after 1 sec again:
navbar-collapse collapse show
Navbar does not close at all after opening.
//edit:
I will add that on codeply it works.

I managed to fix it.
For others who are struggling with the same problem, I will tell you that I had to remove the following from the section:
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>

Related

how to change the color of hamburger icon in bootstrap 5

<nav class="navbar navbar-expand-lg">
<img class="nav-img" src="images/amd-white.svg" alt="">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="#navbarSupportedContent">
<a class="navbar-brand" href=""></a>
<div class="nav2"></div>
<ul class="navbar-nav">
<div class="nav2">
<li class="nav-item">
<div class="dropdown show">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
PRODUCT
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</li>
</div>
<div class="nav2">
<li class="nav-item">
<div class="dropdown show">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
SOLUTION
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</div>
<div class="nav2">
<li class="nav-item">
<div class="dropdown show">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
SHOP
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</div>
<div class="nav2">
<li class="nav-item">
<div class="driver">DRIVERS & SUPPORT</div>
</li>
</div>
</ul>
</div>
What I understood from your question, You can add these bg classes to toggler button and the icon span to change its color, like this:
<button class="navbar-toggler ml-auto bg-danger"
type="button"
data-toggle="collapse"
data-target="#nav1">
<span class="navbar-toggler-icon my-toggler bg-info">
</span>
</button>

Bootstrap - drop downs no longer working online but works perfect in VS Code Live Server

I uploaded my website to a new host, Web Host Canada. I downloaded all the files from the previous host, Hostpapa.ca and then uploaded to the new Host but now the dropdown menus are not working.
www.FeaterX.com
However, in VS-Code Live Server everything is working perfectly.
here is the coding I did for the Navbar
<!-- Featerx nav bar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent no-gutters pb-5 sticky-top trn">
<a class="navbar-brand" href="index.html">
<div class="header-title">
<h4 class="text-center text-light">FeaterX International</h4>
<h6 class="text-center text-light">- est. 1994 -</h6>
</div></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse ml-5" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link text-warning" href="http://thekingslandingresort.ca/">
<h5 class="text-center">The King's Landing Luxury RV Resort</h5>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-warning" href="#" id="navbarDropdownMenuLinkConsulting" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<h5 class="text-center"> FX<em>i</em>-Consulting</h5>
</a>
<div class="dropdown-menu bg-light" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item text-dark" href="FXi_Consulting.html">
<h4 class="text-left">FX<em>i</em>-Consulting</h4>
</a>
<a class="dropdown-item text-dark" href="FXi_JobSite_Solutions.html">
<h4 class="text-left">FX<em>i</em>-JobSite Solutions</h4>
</a>
<a class="dropdown-item text-dark" href="FXi_Learning.html">
<h4 class="text-left">FX<em>i</em>-Learning</h4>
</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-warning" href="#" id="navbarDropdownMenuLink2" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<h5 class="text-center"> Great Reads</h5>
</a>
<div class="dropdown-menu bg-light" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item text-dark" href="FeaterX_Articles_Books_Blogs_etc.html">
<h4 class="text-left">Articles</h4>
</a>
<a class="dropdown-item text-dark" href="FeaterX_Books.html">
<h4 class="text-left">Books</h4>
</a>
<!-- <a class="dropdown-item text-dark" href="FeaterX_Articles_Books_Blogs_etc.html">
<h4 class="text-left">Social Media</h4>
</a> -->
</div>
</li>
</ul>
</div>
<div class="row no-gutters navbutton d-none d-lg-inline">
<div class="col nav-item">
<a class="nav-link" href="Contact.html"> <button type="button" class="btn btn-danger btn-sm">
Contact
</button>
</a>
<a class="LinkedIn" href="https://www.linkedin.com/in/roy-cooper-5b9b3988/">
<img src="images/LI-China-Logo.png" alt="Linked In logo with both english and cantonese characters" class="img-fluid">
</a>
</div>
</div>
</nav>
any thoughts on how to fix this?
Your scripts are not loading. They are missing. Recheck their path:
After your first comment I tested again, and now the protocol HTTP/3 has changed to HTTP/2 but still missing the files. Maybe a permissions problem?
This is the new browser console result:

Foundation6/Sites Reveal Modal Not Working w/ live example

Example of problem is here:
http://liveweave.com/fRs3PL
Basically, I have a modal being triggered from a dropdown, and for some reason the modal hides behind the grey shadow and then disappears altogether a moment later.
What is going on here?!
You need to take the revel modal (<div class="reveal">) and all of its contents and place it so that it is a child of only the <body> element. You don't want it to be contained inside of other elements.
<body>
<div class="row">
<div class="small-12 medium-3 columns">
<ul class="dropdown menu" data-dropdown-menu="" role="menubar" data-dropdownmenu="3z4e20-dropdownmenu" aria-selected="false" aria-expanded="false" data-is-click="false">
<li role="menuitem" class="has-submenu is-dropdown-submenu-parent is-down-arrow" aria-haspopup="true" aria-selected="false" aria-expanded="false" aria-label="Actions" data-is-click="false">
Actions
<ul class="menu submenu is-dropdown-submenu first-sub vertical" data-submenu="" aria-hidden="true" role="menu">
<li role="menuitem" class="is-submenu-item is-dropdown-submenu-item"><a data-open="change-password-modal-0" aria-controls="change-password-modal-0" id="8p079l-reveal" aria-haspopup="true" tabindex="0">Change Password</a>
</li>
<li role="menuitem" class="is-submenu-item is-dropdown-submenu-item">Disable</li>
<li role="menuitem" class="is-submenu-item is-dropdown-submenu-item">Delete</li>
<li role="menuitem" class="is-submenu-item is-dropdown-submenu-item">Transfer</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="reveal" id="change-password-modal-0" data-reveal="rcsjob-reveal" data-reset-on-close="true" aria-labelledby="8p079l-reveal" role="dialog" aria-hidden="true" data-yeti-box="change-password-modal-0" data-resize="change-password-modal-0">
<h1>Change Password</h1>
<p class="lead">You are changing the password for:</p>
<label>Password: <input type="text"></label>
<button class="close-button" data-close="" aria-label="Close reveal" type="button">
<span aria-hidden="true">×</span>
</button>
</div>
</body>

Popover in ionic framework

I am trying to create a popup in my ionic view.
<div class="item tabs tabs-secondary tabs-icon-left">
<a class="tab-item" href="#">
<i class="icon ion-thumbsup"></i> Like
</a>
<a class="tab-item" href="#">
<i class="icon ion-chatbox"></i> Comment
</a>
<a class="tab-item">
<i class="icon ion-share"></i> Share
</a>
</div>
When i click on Share button , I should get the below template as popup.. not as separate view.
<div class="popover-mask"></div>
<div class="popover popover--down" style="top: 20px; left: 165px;">
<div class="popover__top-arrow"></div>
<div class="popover__content">
<ul class="list">
<li class="item">Facebook
</li>
<li class="item">Twitter
</li>
</ul>
</div>
</div>
How to do it?
Thanks,
Sabarisri
create a share button:
<div class="buttons">
<button class="button button-icon ion-more" ng-click="popover.show($event)"></button>
</div>
put your popover template like this:
<script id="templates/popover.html" type="text/ng-template">
<ion-popover-view>
<ion-content>
<div class="popover-mask"></div>
<div class="popover popover--down" style="top: 20px; left: 165px;">
<div class="popover__top-arrow"></div>
<div class="popover__content">
<ul class="list">
<li class="item">Facebook
</li>
<li class="item">Twitter
</li>
</ul>
</div>
</div>
</ion-content>
</ion-popover-view>
</script>
in your controller call the popover like this:
$ionicPopover.fromTemplateUrl('templates/popover.html', {
scope: $scope,
}).then(function(popover) {
$scope.popover = popover;
});

Bootstrap 4 - Dropdowns only work one times with tabs menu

In bootstrap-4, the first time I click a dropdown in a tab menu it works fine, but after that it stops working.
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#home" role="tab" data-toggle="tab">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#profile" role="tab" data-toggle="tab">Profile</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#action" data-toggle="tab">action</a>
<a class="dropdown-item" href="#action_2" data-toggle="tab">Another action</a>
</div>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home">
HOME
</div>
<div role="tabpanel" class="tab-pane" id="profile">
PROFILE
</div>
<div role="tabpanel" class="tab-pane" id="action">
ACTION 1
</div>
<div role="tabpanel" class="tab-pane" id="action_2">
ACTION 2
</div>
</div>
Here's a Demo in Bootply
The issue appears to be caused by not clearing the .active class from the dropdown item when another tab is opened, therefore leaving it highlighted and preventing the same dropdown item from being clicked again.
According to the workaround in Issue #17371 - navs dropdown tab bug, you can add the following js until the issue is resolved:
$('.nav-tabs').on('shown.bs.tab', 'a', function (e) {
if (e.relatedTarget) {
$(e.relatedTarget).removeClass('active');
}
})
Demo in Stack Snippets
$('.nav-tabs').on('shown.bs.tab', 'a', function (e) {
if (e.relatedTarget) {
$(e.relatedTarget).removeClass('active');
}
})
<!-- 4.0.0-alpha.2 Libraries -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/js/bootstrap.min.js"></script>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#home" role="tab" data-toggle="tab">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#profile" role="tab" data-toggle="tab">Profile</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#action" data-toggle="tab">action</a>
<a class="dropdown-item" href="#action_2" data-toggle="tab">Another action</a>
</div>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home">
HOME
</div>
<div role="tabpanel" class="tab-pane" id="profile">
PROFILE
</div>
<div role="tabpanel" class="tab-pane" id="action">
ACTION 1
</div>
<div role="tabpanel" class="tab-pane" id="action_2">
ACTION 2
</div>
</div>