0

I use bootstrap for my site the toggle button work on computer browser but don't work on mobile browser

This is the code:

 <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="css/bootstrap-multiselect.css">
    <link href="css/bootstrap-select.min.css" rel="stylesheet" />
    <link href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
    <link rel="stylesheet" href="https://rawgit.com/trentrichardson/jQuery-Timepicker-Addon/master/dist/jquery-ui-timepicker-addon.min.css">
    <link href="css/lightbox.css" rel="stylesheet" />
    <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico"  />

    <nav class="navbar navbar-default">
        <div class="container-fluid">
          <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar4">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
          <a class="navbar-brand" href="main.php"><img src="img/t-square-logo-Final.png" alt="T-square" class="tslogo"/></a>
        </div>
        <div id="navbar4" class="navbar-collapse collapse">
        <ul class="nav navbar-nav">
          <li class="active"><a href="main.php">Home</a></li>
          <li><a href="dms.php">DMS</a></li>
          <li><a href="main.php?action=backup">Backup</a></li>
          <li><a href="logout.php">LogOut</a></li>
        </ul>
      </div>
      </div>
    </nav>

<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

I try to do like here But i stil have the same problem

Any one can help to solve my problem ??

mohamad mohamad
  • 613
  • 9
  • 24

2 Answers2

4

Add this to the header

<meta name="viewport" content="width=device-width, initial-scale=1">
Dilip Belgumpi
  • 658
  • 4
  • 13
1

Your script: bootstrap.min.js is not loaded. When i delete this file in my project the toggle buttons stops working.

Can you verify if your file is loaded properly?

Peter Bode
  • 222
  • 1
  • 9