django - Bootstrap navbar collapse menu does not work over https -
i using bootstrap 3.3.2 django 1.8.8 build website. using mod-wsgi version 4.4.23 , apache 2.2.15 deploy on centos vm.
i have navbar fixed top, collapsible signup menu. when connect website on http , click on menu, dropdown menu items listed. when connect on https , same, dropdown menu items not displayed. same thing happens when click on minimized navbar menu items when viewport shrinks.
what going wrong?
the base template code here:
<!doctype html> <html lang="en"> {% load staticfiles %} <head> <link href='http://fonts.googleapis.com/css?family=open+sans' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=roboto' rel='stylesheet' type='text/css'> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="../../favicon.ico"> <title>title</title> <!-- bootstrap core css --> <link href="{% static 'bootstrap-3.3.2-dist/css/bootstrap_cerulean.min.css' %}" rel="stylesheet" /> <!-- custom styles template --> <link href="{% static 'bootstrap-3.3.2-dist/css/custom_cerulean.css' %}" rel="stylesheet" /> <!-- load javascript files --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script src="{% static 'bootstrap-3.3.2-dist/js/bootstrap.min.js' %}"></script> <!-- html5 shim , respond.js ie8 support of html5 elements , media queries --> <!--[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> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class = "navbar-brand" href="/"> <img style="width:auto; height:160%;" src="{% static "logo.jpg" %}"> </a> {% if user.is_authenticated %} <a class = "navbar-brand" href="{% url 'myapp:profile' %}"> <span class="glyphicon glyphicon-home"></span> </a> {% endif %} </div><!--/.navbar-header --> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-left"> {% if not user.is_authenticated %} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> sign up</a> <ul class="dropdown-menu" role="menu"> <li><a href="/myapp/accounts/signup_employer">new employer</a></li> <li><a href="/myapp/accounts/signup_employee">new employee</a></li> </ul> </li> {% endif %} <li> {% if not user.is_authenticated %} <a href="/myapp/accounts/login"> login</a> {% else %} <a href="/myapp/accounts/logout"> logout</a> {% endif %} </li> {% if user.is_authenticated %} <li> <a href="/myapp/accounts/password_change"> change password</a> </li> <li> <a href="/myapp/">myapp</a> </li> {% endif %} </ul><!--/.navbar-left --> <ul class="nav navbar-nav navbar-right"> <li> <a href="/about_us"> us</a> </li> <li> <a href="/contact_us"> contact us</a> </li> </ul><!--/.navbar-right --> </div><!--/.navbar-collapse --> </div><!--/.container --> </nav>
this call load jquery http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"
http address. it's possible browser won't load when go https. that'll break kinds of things.
additionally have fonts @ http:// addresses. easiest way fix prefix // .
right click , inspect, in browsers you'll see error in dev tools.
Comments
Post a Comment