Enable sidebar navigation exclusively for mobile and iPad devices

Is there a way to implement a different navigation bar specifically for mobile devices like iPads? I'm considering using this one:

Here is the source code: JSFiddle

If anyone knows how to achieve this, please share!

<link rel="shortcut icon" type="image/png" href="images/logo.png" />
    <title>ITBataljonen</title>

    <!-- Bootstrap core CSS-->

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
            <div class="navbar-header">
                <button type="button" 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>
                </button>
                <a href="index.html" class="pull-left"><img src="http://itbataljonen.com/images/logoinverse.png" class="img-responsive"></a>
                <!-- <a class="navbar-brand" href="index.html">ITBataljonen</a> -->
            </div>

    <!-- Fixed navbar END -->     
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">NYHETER<span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="#">SISTE</a></li>
                <li><a href="#">APPLE</a></li>
                <li><a href="#">GOOGLE</a></li>
                <li><a href="#">MICROSOFT</a></li>
              </ul>
            </li>
                <li><a href="index.html">FORUM</a></li>
                <li><a href="index.html">ANMELDELSER</a></li>
                <li><a href="podcast/">PODCAST</a></li>
                <li><a href="livestream/">LIVESTREAM</a></li>
                <li><a href="shop/">SHOP</a></li>
                <li><a href="#">SPILLBATALJONEN</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">MER<span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="contact/">KONTAKT OSS</a></li>
                <li><a href="writeus/">SKRIV FOR OSS</a></li>
                <li><a href="tips/">TIPS OSS</a></li>
              </ul>
            </li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">

      <!-- Main component for a primary marketing message or call to action -->
      <div class="jumbotron">
      <div class="container">
        <div class="row">
          <div class="col-xs-6">
                <img src="images/uploaded/2015/03/windows10.png" class="img-responsive" alt="Responsive image">
                Microsoft offers free 200GB storage with Office download.
            </div>             
            <div class="col-xs-6">
                <img src="images/uploaded/2015/03/google.jpg" class="img-responsive" alt="Responsive image">
                Google faces legal action, find out more about it here.
            </div>
           </div>      
          </div>
         </div>

    </div> <!-- /container -->
<!--/ MAIN CONTENT -->

Answer №1

To resolve the issue, consider adding the "hidden-sm" class to the horizontal navbar and the "hidden-md" class to the vertical navbar.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Verify if a personalized angular directive is able to display or conceal an element

I have a custom directive that toggles the visibility of an element based on the value of another service. I attempted to write a test to verify if the directive functions as intended. Initially, I used the ":visible" selector in my test, but it consistent ...

Finding the exact location of a specific element within a div: tips and tricks

Is there a way to determine the position of an image inside a div when clicked? Here is my HTML code: <div> <p>test</p> <img src='test1.jpg'/> <p>test</p> <p>test</p> <img src=&ap ...

Keep track of the toggled state and prevent any flickering when the page is reloaded, all without the

After extensive searching, I couldn't find exactly what I needed. Therefore, I decided to utilize cookies to remember the toggled state of a div whether it's hidden or visible. However, I encountered an issue where there is flicker happening as t ...

Tips for obtaining HTML content from a webpage through ajax?

I'm working on an AJAX request and facing a specific issue: function grabContent(url) { $.ajax({ url: url, error: function() { console.log('Error occurred'); ...

Choosing the subsequent element that comes before

<tr class="main"></tr> <tr class="emails-details"> <button>some button</button> </tr> <tr class="main"></tr> <tr class="emails-details"> <button>some button</button> </tr> &l ...

Tips on retrieving Bootstrap selectpicker value by using loops in Jquery

I am attempting to perform a basic validation using jQuery, where I need to iterate through all elements to check for the existence of values. The validation script is working well except for the jQuery selectpicker functionality. Here's what I have t ...

Discover the secret to easily displaying or concealing the form of your choice with the perfect fields

Greetings! I require assistance in understanding how to hide or display a form. Specifically, I have two forms - studentForm and EmployeeForm. When selected from the dropdown list profileType, I want the corresponding form to be displayed. I am facing an ...

jQuery's show/hide function exhibiting inconsistencies when checking or unchecking

I have implemented a feature on my webpage where there is a field for previous surgeries with certain elements. The goal is to display the previous surgery elements only if the "previous surgery" checkbox is checked. Below is a snippet of the code I'm ...

Tips for designing adjustable text in bootstrap 4

Could someone please assist me with making text responsive using Bootstrap 4? I have searched everywhere but it's strange to see that there are no tutorials on this topic. Below are my codes in case you would like to provide guidance. <div class=" ...

Passing the array or object back to the jQuery script using AJAX

Hey everyone, I just wanted to say thanks in advance for any help! I'm currently facing an issue with populating select options dynamically using a plugin and AJAX. The problem is that the select element is created before the ajax call can finish, ca ...

Steps to include a HTML webpage within another page

I need assistance with a scenario involving two separate HTML pages on different servers. Merchant Form - Server A Payment Form - Server B Here's the desired scenario: The user completes all necessary fields on the Merchant Form and clicks submit. ...

What could be causing the absence of a background image in CSS?

When I try to view my local desktop file, the CSS background image isn't showing up. Here's the code I'm using: <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" text="type/css" href="dis ...

UI-Bootstrap selectively adds modal backdrop to specific elements

I have encountered a unique situation with my application where I am displaying a UI-Bootstrap modal inside a div, positioned above a navigation bar. Typically, when the modal is launched, a backdrop (dimmer) covers the entire background. Interestingly, my ...

Effortlessly apply CSS styles to multiple cached jQuery variables without redundancy

Hey there, I've got this piece of code written in Javascript for a classic ASP page. Since there are no CSS classes defined, everything is handled within the Javascript itself. var $a= $('#a'), $v= $('#v'), $s= $('#s'), ...

CSS: Achieving vertical centering without specifying a fixed height using line-height. Is it possible?

Using line-height to vertically center text within an inline-element is a technique I often employ. Here's a demo I created: body, section { width: 100%; } section { background-color: lightGrey; } #wrap { margin: 30px auto; width: 100%; ...

Tips for transferring an MVC model to a UI-bootstrap modal

Trying to implement an Angular/bootstrap modal for editing MVC ApplicationUser scaffolded views. Came across jquery examples but want to stick with angular-ui or plain bootstrap for consistency in modals. Unclear on how the MVC controller is being called f ...

In order to properly adjust the HTML content when resizing the window, it

I'm facing an issue with a toggle setup for displaying content differently based on screen width. Specifically, when the screen size decreases below 600px, it switches to the correct content. However, upon increasing the screen width again, it fails t ...

Guide to connecting a different HTML page to a thumbnail image using jQuery

let newColumnBlock = $('<div class="col-md-2">'); let newImagePoster = $('<img>'); let newSelectButton = $('<a href="secondPage.html"><button class="selectButton"></button></a>'); let movie ...

Sending a value to a text box using json data transmission

I am having trouble accessing data from a js file and fetching the value to an html text box. Despite trying, I'm unable to get the desired result. Below are the contents of samle.js file and jsonhtml.html file: { "var1": "1", "var2": "2" } <scri ...

PHP suffered a breakdown of its encoding capabilities when utilized alongside Ajax and jQuery

Trying to understand the issue, I am attempting to send the string "Técnico" to PHP, but it appears as "Técnico" in the $_POST variable. This problem is specific to this particular project. I have three other projects running on Apache2 (in the same / ...