Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navbar: Dropdown on hover? #983

Closed
ledermann opened this issue Jan 13, 2012 · 10 comments

Comments

Projects
None yet
9 participants
@ledermann
Copy link

commented Jan 13, 2012

Is it possible to build (with 2.0-wip) a navbar including dropdowns which are not required to be clicked? I would like to see the dropdown menu on mouse over.

@fat

This comment has been minimized.

Copy link
Member

commented Jan 13, 2012

this isn't currently possible and was a conscious design decision to make them activate on click only. That said, it should be very trivial to get them working on hover - i'd try asking on the mailing list - thanks!

@fat fat closed this Jan 13, 2012

@darklow

This comment has been minimized.

Copy link

commented Jan 25, 2012

If anyone still interested about showing dropdown on hover, here is the answer:
http://stackoverflow.com/questions/8878033/how-to-make-twitter-bootstrap-menu-dropdown-on-hover-rather-than-click/8878666#8878666

Unfortunately it doesn't work perfectly in wip2.0 version because of margin-top:1px. Menu hides if you move to slow. However you can remove this gap by css if it is so important.

@bipin-xit

This comment has been minimized.

Copy link

commented Sep 14, 2012

Hi, this works with the solution given on stackoverflow. But still the parent link is not clickable. Any idea?

@thezoggy

This comment has been minimized.

Copy link

commented Sep 15, 2012

the trick is to put disabled in the dropdown-toggle when doing the hover hack.

<a href="/whatever/" class="dropdown-toggle disabled" data-toggle="dropdown">Whatever <b class="caret"></b></a>
@ge0ffrey

This comment has been minimized.

Copy link

commented Mar 8, 2013

Any chance of supporting this hover over on navbar out of the box? The stackoverflow question has 130 votes already, so there's definitely demand for a flag to enable hover over behaviour :)

@cvrebert

This comment has been minimized.

Copy link
Member

commented Mar 8, 2013

@ge0ffrey: one difficulty is that the menu would still have to work on mobile somehow, since v3.0.0 is going to be mobile-first.

@CWSpear

This comment has been minimized.

Copy link

commented Mar 11, 2013

@ge0ffrey I have a plugin that does this. I understand what fat doesn't want to support it (by decision, not because he can't) and respect that. For anyone else that wants they to activate the nav on hover, head over to my plugin at https://github.com/CWSpear/twitter-bootstrap-hover-dropdown

@ge0ffrey

This comment has been minimized.

Copy link

commented Mar 11, 2013

@CWSpear Thanks, just what I need :)
Although in the long run, I 'd like to have my cake and eat it too: hover + work on mobile

@CWSpear

This comment has been minimized.

Copy link

commented Mar 11, 2013

@ge0ffrey So prepare to have your mind blown, but it doesn't interfere with how bootstrap works, so if you have them both, it works on mobile (i.e. by click) and then by hover on desktop.

There's a couple tweaks I need to make yet, i.e. concerning submenus, but yeah. It's at least a very good starting point.

@ruffrey

This comment has been minimized.

Copy link

commented Aug 3, 2013

another one, quite similar, works on desktop/mobile with click
https://github.com/ruffrey/bootstrap-animated-dropdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.