My navigation is Twitter's regular Bootstrap, except that I'd like to have some slide effects.
How can I make the dropdown on my Bootstrap navigation slide smoothly up and down?
My navigation is Twitter's regular Bootstrap, except that I'd like to have some slide effects.
How can I make the dropdown on my Bootstrap navigation slide smoothly up and down?
I haven't checked to see if this works with older versions of Bootstrap, but with v3, you can tie into the events that get fired when the dropdown toggle is clicked. This way you don't have to edit the source JS code.
Well, it's done by switching a class name according to what I've gathered from http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js..
If anything, you'd have to properly manually edit the dropdown JS to support a custom setup for animations for opening and closing the menus. It's very viable and I think something like this would work: https://gist.github.com/3013002
Warning This has not been tested.
EDIT: This'll cause Bootstrap to rely on jQuery.effects more. Just a heads up.
If someone will need - check my solution. Modified bootstrap-dropdown.js below. Rather than switching display:none to display:block, I use slideToggle. And for bootstrap CSS not to interract I've changed class of an opened menu item from "open" to "opened".