Bootstrap fixed-top navbar with jquery hover menu tab drops -
i'm learning how use bootstrap framework on building website. , there navbar hover effect i'd replicate. please see example below provided bootstrap. https://www.aceandtate.com/ effect is: menu texts show while nav bar drops when mouse on nav-bar container area. navbar white unfold drops while mouse hover
can show me how that?
thanks,
first, create dropdown bootstrap. (i assume have index.html,css folder, , js folder in 1 folder). index.html use bootstrap create dropdown menu.
in js folder, edit (create if none) script.js file. add script
$('ul.nav li.dropdown').hover(function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadein(500); }, function() { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeout(500); });
after that, include script (if not yet include in html file)
<script src="js/scripts.js"></script>
i place before
</body>
now dropdown menu automatic show when hover mouse
source : http://codepen.io/betdream/pen/frdqh
Comments
Post a Comment