bootstrap nav link

Permalink
Hi, I'm using the bootstrap theme on my c5 website and I have a problem with my header nav behavior. What I'm looking for is to assign a link on the parent in the main menu also if it has a dropdown. Now when you hover on a link it shows the submenu but it isn't cliccable. Instead I want an "href" also in the parent link and this must work correctly also on touch device. I want something like thishttp://www.google.com/think/ or like thishttp://flatstrap.goradiantweb.com/....
Can anyone help me?

adwlabs
 
bbeng89 replied on at Permalink Reply
bbeng89
You could give this a shot:

https://github.com/CWSpear/twitter-bootstrap-hover-dropdown...

That would allow you to hover on the menu item and have it open the menu rather than having to click it. Then I believe you should just be able to set the href on the parent.

I haven't used that plugin before so I can't say for sure if it will work for you, but I think it should.
bbeng89 replied on at Permalink Reply
bbeng89
I should also mention that if you are using bootstrap 2 you will need to download the bootstrap-2.x.x branch of that repository.
adwlabs replied on at Permalink Reply
adwlabs
Thank you for your reply, but unfortunately it doesn't work for me. I alredy try the solution, but I think the problem is that it refers to bootstrap 3. However I obtained the "hover" behavior only by adding this code
<script type="text/javascript">$(document).ready(function() {
    $('.nav li.dropdown').hover(function() {
        $(this).addClass('open');
    }, function() {
        $(this).removeClass('open');
    });
});</script>


or this code
<script type="text/javascript">
$('ul.nav li.dropdown').hover(function() {
  $(this).find('.dropdown-menu').stop(true, true).delay(200).slideDown(500);
}, function() {
  $(this).find('.dropdown-menu').stop(true, true).delay(200).slideUp(500);
});</script>


(the second one is better for me)

and it works for me, but I'm not able to link the parent item. So I have the dropdown on hover but I haven't the "href" in first item.