Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:25:45+00:00 2026-06-10T11:25:45+00:00

I have a bootstrap dropdown in the navbar that works perfectly, except when I

  • 0

I have a bootstrap dropdown in the navbar that works perfectly, except when I shrink the browser into tablet or phone size (< 767px wide). Code for the navbar is:

<div class="navbar navbar-fixed-top">
 <div class="navbar-inner">
  <div class="container-fluid">

   <a href="<%= root_url %>" class="brand brandtag"></a>
   <a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
   </a>

  <div class="pull-right"> # DROPDOWN THAT WORKS SPORADICALLY
   <div id="user-nav">
    <div class="not-logged-in">
     <a class="dropdown-toggle btn btn-inverse" href="<%= new_user_session_path %>" data-toggle="dropdown">
      Login <span class='caret'></span>
     </a>
     <div class="dropdown-menu">
      <%= render "devise/sessions/new_from_dropdown" %>
     </div>
    </div>
   </div>
  </div>

  <div class="nav-collapse">
    <ul class="nav">
      <li class="active"><a>Link 1</a></li>
      <li class="active"><a>Link 2</a></li>
      <li class="active"><a>Link 3</a></li>
      <li class="active"><a>Link 4</a></li>
    </ul>
  </div><!--/.nav-collapse -->
</div>

and my javascript is straightforward:

jQuery ->
  $(".dropdown-toggle").attr("href", "#").dropdown()
  $('.dropdown-menu form label.hide').hide()
  $('.dropdown-menu input, .dropdown-menu label').on 'click', (e) ->
    e.stopPropagation()

The dropdown works perfectly fine in larger sizes (> 767px), but once the screen drops below that size, the dropdown stops showing. I can resize the screen larger or smaller and the dropdown will come back or go away, respectively, as it passes through the 767px width.

Does anyone know how to fix this? Seems to be something in bootstrap’s javascript, but I can’t figure out what.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:25:47+00:00Added an answer on June 10, 2026 at 11:25 am

    For some reason, wrapping the “dropdown-toggle” and “dropdown-menu” divs in another div with class=”dropdown” solves this problem. So the code above works with the very minor change:

    <div class="pull-right"> # DROPDOWN THAT WORKS SPORADICALLY
     <div id="user-nav">
      <div class="dropdown not-logged-in"> # <-- "dropdown" class added
       <a class="dropdown-toggle btn btn-inverse" href="<%= new_user_session_path %>" data-toggle="dropdown">
        Login <span class='caret'></span>
       </a>
       <div class="dropdown-menu">
        <%= render "devise/sessions/new_from_dropdown" %>
       </div>
      </div>
     </div>
    

    I have no idea why this only affects the mobile & tablet sizes, but such is the pitfall of using another person’s framework!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get Twitter Bootstrap btn-group with dropdown to work for
I have a question with Twitter Bootstrap, I'm using the Dropdown plugin and I'm
I am using twitter bootstrap and have a fixed nav bar. The navbar has
I have an app that is using twitter-bootstrap and I am trying to implement
Twitter Bootstrap http://twitter.github.com/bootstrap/javascript.html#dropdown has a dropdown.js library (at http://twitter.github.com/bootstrap/1.4.0/bootstrap-dropdown.js )that will change the dropdown
I have problem getting the dropdown menu to work using Twitter's Bootstrap. Here's my
Thanks for trying to help in advance! My problem is that twitter bootstrap's dropdown
I have a dropdown menu in my layout/applications.html.erb done with twitter bootstrap <li class=divider-vertical></li>
I have a Dropdown in my TopBar, built with the Twitter Bootstrap CSS framework.
I have this bootstrap twitter dropdown menu. I replaced the click event with hover

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.