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

Cart Dropdown Menu #2

Open
Fethr opened this issue Jul 5, 2016 · 1 comment
Open

Cart Dropdown Menu #2

Fethr opened this issue Jul 5, 2016 · 1 comment

Comments

@Fethr
Copy link

Fethr commented Jul 5, 2016

I first want to say, great job with the Bootstrap Navbar! I want to display the cart dropdown on click instead of hover, and can't find the function that makes this happen. Is their a way to display just the cart dropdown on click instead of hover leaving all other menu dropdowns to display on hover?

@adamnurdin01
Copy link
Owner

Just for sugestion.

you can give some class to cart dropdown, and disable "mouseenter" on this class,. like this

$("nav.navbar").each(function(){
$("li.dropdown.someClass", this).off("mouseenter");
$("li.dropdown.someClass", this).off("mouseleave");
$("li.dropdown.someClass > a.dropdown-toggle", this).on("click", function(e){
e.preventDefault();
$(this).closest("li.dropdown").find(".dropdown-menu").stop().fadeIn();
});
$("ul.nav", this).on("mouseleave", function(){
$("li.dropdown", this).find(".dropdown-menu").stop().fadeOut();
});
});

Hope this can help you... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants