user1765862
user1765862

Reputation: 14145

bootstrap menu show menu on hover instead of click

I'm using bootstrap to generate html horizontal menu

<div class="btn-group"">             
    <div class="btn-group">
        <button type="button" data-toggle="dropdown" class="btn btn-inverse dropdown-toggle">About Us<span class="caret"></span></button>
        <ul class="dropdown-menu">
           <li><a href="/a/">Submenu 1</a></li>
           <li><a href="/b/">Submenu 2</a></li>
        </ul>
    </div>
</div>

This works on click, how can I rework this to change behaviour, to show submenu items menu on hover instead of click ?

Upvotes: 1

Views: 2466

Answers (1)

Andrew Bone
Andrew Bone

Reputation: 7291

Add this css

.btn-group:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

Upvotes: 5

Related Questions