via FileHippo.com http://ift.tt/19uW5kY [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
Tech News is a blog created by Wasim Akhtar to deliver Technical news with the latest and greatest in the world of technology. We provide content in the form of articles, videos, and product reviews.
Flash Player 21.0.0.174 Beta (Non-IE)
via FileHippo.com http://ift.tt/19uW5kY [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
Flash Player 21.0.0.174 Beta (IE)
via FileHippo.com http://ift.tt/19uW7cB [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
Beyond Compare 4.1.4
via FileHippo.com http://ift.tt/1g91y0Y [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
dotConnect for MySQL 8.4.602
via FileHippo.com http://ift.tt/1ttBAPF [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
KiTTY 0.66.6.3
via FileHippo.com http://ift.tt/1beCQzO [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
Evernote Web Clipper 6.7.1
via FileHippo.com http://ift.tt/1HDnFbz [[ We are also giving web service. Email:wasim.akh2@gmail.com]]
Bootstrap Navbar Menu without JavaScript
Bootstrap Navbar Menu without JavaScript – Bootstrap is getting lot of traction since past few years. While many argue it makes web look plain and similar, it has been boon to non-ui developers. The learning curve is also easy and thus you can make good looking web pages in no time.
Update: For Bootstrap 4 example scroll to the bottom of post.
One of most used component of Bootstrap with Navbar. The navbar menu is responsive and adapts to any screen size. For small devices (mobile) the navbar get collapsed and a burger icon appears which can be used to open/close menu in navbar.
To collapse/uncollapse the menu you have to include bootstrap javascript and jquery javascript in your webpage. Sometime this is a little uncomfortable. Say you have a static webpage without any javascript. If you want to show/hide the navbar menu then you have to include all these javascript files unnecessarily. There must be a way of getting away with javascript and still able to use bootstrap navbar? Well there is. You can make bootstrap navbar hide/show for mobile devices without using javascript. Checkout the following code.
The HTML
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<input type="checkbox" id="navbar-toggle-cbox">
<div class="navbar-header">
<label for="navbar-toggle-cbox" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</label>
<a class="navbar-brand" href="#">Project name</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
</ul>
</div>
</div>
</nav>
The CSS
#navbar-toggle-cbox {
display:none
}
#navbar-toggle-cbox:checked ~ .collapse {
display: block;
}
So how does this works? First check the html. We added a checkbox and hide it using CSS. Next we changed the button into label and connect the label to checkbox using for="". So whenever you click the burger menu which act as label for checkbox toggles it state. And as per the state of checkbox we show or hide the content.
Online Demo – Bootstrap Navbar Menu without JavaScript
Below is the demo, click on the burger menu button to toggle navbar menu.
JSFiddle: http://ift.tt/1TU3BNJ
Bootstrap 4 Navbar without JavaScript
You can do the same with Bootstrap v4 which is still in alpha at the time I am writing this. Below is the fiddle preview.
The post Bootstrap Navbar Menu without JavaScript appeared first on ViralPatel.net.
Related Articles
- How to apply HTML User Interface Effects using jQuery.
- Dynamically shortened Text with “Show More” link using jQuery
- CSS Styling Radio Button and Checkboxes
- Sum HTML Textbox Values using jQuery / JavaScript
- JQuery Trigger Event on Show/Hide of Element
- Multiple Checkbox Select/Deselect using jQuery – Tutorial with Example
- Tutorial: Handle browser events using jQuery JavaScript framework
via ViralPatel.net http://ift.tt/1LXNcjj
[Software Update] Vivaldi 7.9 Minor Update (4) Released, Here is What’s New and Fixed
UPDATE: Release of Minor Update (4) for Vivaldi 7.9 stable version to public. Good news for Vivaldi browser users! Vivaldi team has released...
-
UPDATE: Direct download links added for the latest Mozilla Firefox 131.0.2, 115.16.1 ESR and 128.3.1 ESR offline installers. NOTE: The downl...
-
Newer versions of Windows 11 come with a new security feature called “Windows Protected Print Mode (WPP)“. This article will help you in act...